Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298730

Xss::filter() for comments with HTML/XML tags and linebreaks

$
0
0

Problem/Motivation

Xss::filter() doesn't seem to filter correctly comments when there are HTML/XML tags in them. These are mostly HTML that were copied directly from MS Word.

Steps to reproduce

>>> \Drupal\Component\Utility\Xss::filter("<!--\ntest\n-->");
=> "">>> \Drupal\Component\Utility\Xss::filter("<!--\n<title>test</title>\n-->");
=> """
   test\n
   --&gt;
   """>>> \Drupal\Component\Utility\Xss::filter("<!--<title>test</title>-->");
=> "">>>

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet


Viewing all articles
Browse latest Browse all 298730

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>