[wp-trac] [WordPress Trac] #34698: HTML-Embed code JavaScript error.
WordPress Trac
noreply at wordpress.org
Thu Nov 19 04:28:53 UTC 2015
#34698: HTML-Embed code JavaScript error.
-------------------------------------------------+-------------------------
Reporter: nendeb55 | Owner: swissspidy
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.4
Component: Embeds | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch dev-feedback needs-unit- | Focuses:
tests |
-------------------------------------------------+-------------------------
Changes (by pento):
* keywords: => has-patch dev-feedback needs-unit-tests
Comment:
[attachment:34698.diff] is a first pass at fixing this.
I removed `convert_chars()` from the `the_content` filter, as it seems to
be made entirely redundant by `wptexturize()`.
Moving the `&` replacement to inside the loop fixes this bug, but it
causes some unit tests to fail:
{{{
1) Tests_Formatting_WPTexturize::test_tag_avoidance with data set #4 ('[
photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]', '[
photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a>
]')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy
</a> ]'
+'[ photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a> ]'
/srv/www/wordpress-
develop/tests/phpunit/tests/formatting/WPTexturize.php:1248
2) Tests_Formatting_WPTexturize::test_tag_avoidance with data set #5
('[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a>]',
'[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy
</a>]')
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy
</a>]'
+'[photos by <a href="http://example.com/?a[]=1&a[]=2"> this guy </a>]'
/srv/www/wordpress-
develop/tests/phpunit/tests/formatting/WPTexturize.php:1248
}}}
@miqrogroove, could you please lend your expertise to this?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34698#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list