Comments

drumm’s picture

Status: Active » Needs review
StatusFileSize
new1.38 KB
new1.38 KB

Status: Needs review » Needs work

The last submitted patch, filter.module.diff, failed testing.

dave reid’s picture

Please patch using --no-prefix when using Git. :)

+++ b/modules/filter/filter.moduleundefined
@@ -1587,13 +1587,13 @@ function _filter_htmlcorrector($text) {
-  $chunks = preg_split('@(<!--.*?-->|</?(?:pre|script|style|object|!--)[^>]*>)@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
+  $chunks = preg_split('@(<!--.*?-->|</?(?:pre|script|style|object|canvas|progress|video|!--)[^>]*>)@i', $text, -1, PREG_SPLIT_DELIM_CAPTURE);
   // Note: PHP ensures the array consists of alternating delimiters and literals
   // and begins and ends with a literal (inserting NULL as required).
   $ignore = FALSE;

Wondering why audio is excluded here if we're adding video?

Powered by Dreditor.

jensimmons’s picture

Issue tags: +html5
bleen’s picture

+++ b/modules/filter/filter.moduleundefined
@@ -890,13 +890,13 @@ function _filter_url_trim($text, $length = NULL) {
   // Split at <pre>, <script>, <style> and </pre>, </script>, </style> tags.

Comments should reflect changes below.

+++ b/modules/filter/filter.moduleundefined
@@ -890,13 +890,13 @@ function _filter_url_trim($text, $length = NULL) {
+  $chunks = preg_split('@(<(?:!--.*?--|/?(?:pre|script|style|object|canvas|progress|video)[^>]*)>)@si', $text, -1, PREG_SPLIT_DELIM_CAPTURE);

what about code tags?

Powered by Dreditor.

alanburke’s picture

Subscribe.

drumm’s picture

Status: Needs work » Needs review
StatusFileSize
new1.75 KB
new1.74 KB

Updated patches for #3 and #5.

amateescu’s picture

sub.

bleen’s picture

My comment in #5 about < code > tags was a question, not a suggestion. Why arent we including code there?

drumm’s picture

@bleen18 - Sorry, I missed that. <code> is usually an inline element and it not new to HTML 5, so the handling should stay the same as far as this issue is concerned.

idflood’s picture

Version: 7.x-dev » 8.x-dev
StatusFileSize
new1.78 KB

same patch as #7 but for d8. The patch wasn't applicable so I hope I didn't made mistakes.

What is the easiest way to verify that it's working?

cosmicdreams’s picture

This patch appears to be conclusive, given the reference to block level elements listed above and the completeness of the patch.

I'll find time to test it this week.

jacine’s picture

Priority: Normal » Major
Status: Needs review » Closed (duplicate)

Most of what's in this patch has already been committed via #1280522: _filter_autop (line break converter) does not recognize html5 block level elements. I guess we missed this one, but since that was committed, I'm marking this one as duplicate. If there is anything else needed here please open a new issue and tag it "html5." Thanks!