When a user insert a text with a link and that link have the title attribute which contains ">" the filter freaks out. For eaxmple:

<a href='http://google.com' title='Foo >'>Google</a>

The text turns out to be:
<a href="http://google.com">'&gt;dasdasd</a>

Which looks like
'>dasdasd

That comes from _wysiwyg_filter_xss_split which the REGEX pattern try to find where the html element breaks and thinks the ">" in the title attribute and then break the html tag.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RoySegall created an issue. See original summary.

geek-merlin’s picture

Title: The filter freaks our when there in an apostrophes in one of the attributes » The filter freaks our when there is ">" in one of the attributes
Priority: Normal » Major
Issue summary: View changes

Huh, this is an ugly consequency of the regexp-parsing of this module.

Yes, ">" is allowed.
https://stackoverflow.com/questions/94528/is-u003e-greater-than-sign-all...

IMHO it's this regexp line in wysiwyg_filter_filter_wysiwyg_process():

    <[^>]*(>|$)       # a string that starts with a <, up until the > or the end of the string
geek-merlin’s picture

geek-merlin’s picture

Status: Needs review » Needs work
geek-merlin’s picture

Status: Needs work » Needs review

Drupal infra bug...

  • axel.rutz committed edf3172 on 7.x-1.x
    Issue #2856897: The filter freaks our when there is ">" in one of the...
geek-merlin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.