Security: Portfolio: Apply remove XSS on items and comments content - refs BT#22113

pull/5867/head
Angel Fernando Quiroz Campos 11 months ago
parent b544020d8c
commit 7a72f095fa
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 8
      main/inc/lib/PortfolioController.php
  2. 2
      main/template/default/portfolio/view.html.twig

@ -661,7 +661,7 @@ class PortfolioController
});
$(\'#add_portfolio_template\').on(\'change\', function () {
$(\'#portfolio-spinner\').show();
$.getJSON(_p.web_ajax + \'portfolio.ajax.php?a=find_template&item=\' + this.value)
.done(function(response) {
if (CKEDITOR.instances.title) {
@ -3994,7 +3994,7 @@ class PortfolioController
$(function() {
$(\'#frm_comment_template\').on(\'change\', function () {
$(\'#portfolio-spinner\').show();
$.getJSON(_p.web_ajax + \'portfolio.ajax.php?a=find_template_comment&comment=\' + this.value)
.done(function(response) {
CKEDITOR.instances.content.setData(response.content);
@ -4094,7 +4094,7 @@ class PortfolioController
$origin = $em->find(Portfolio::class, $item->getOrigin());
if ($origin) {
$originContent = $origin->getContent();
$originContent = Security::remove_XSS($origin->getContent());
$originContentFooter = vsprintf(
get_lang('OriginallyPublishedAsXTitleByYUser'),
[
@ -4107,7 +4107,7 @@ class PortfolioController
$origin = $em->find(PortfolioComment::class, $item->getOrigin());
if ($origin) {
$originContent = $origin->getContent();
$originContent = Security::remove_XSS($origin->getContent());
$originContentFooter = vsprintf(
get_lang('OriginallyCommentedByXUserInYItem'),
[

@ -47,7 +47,7 @@
</ul>
</header>
{{ item_content }}
{{ item_content|remove_xss }}
{% if attachment_list %}
<section>

Loading…
Cancel
Save