[wp-trac] [WordPress Trac] #12690: Square brackets breaking links that contain square brackets
WordPress Trac
noreply at wordpress.org
Thu Jul 24 16:07:23 UTC 2014
#12690: Square brackets breaking links that contain square brackets
-----------------------------------+-----------------------------
Reporter: iandstewart | Owner: wonderboymusic
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.0
Component: Formatting | Version:
Severity: normal | Resolution:
Keywords: wptexturize has-patch | Focuses:
-----------------------------------+-----------------------------
Comment (by miqrogroove):
As far as I understand that article so far, it means the existing three
greedy quantifiers should also be made possessive because the proceeding
chars are mutually exclusive and there should be no chance of finding
matches through backtracking. That needs to be tested though. In other
words...
{{{
/(<(?(?=!--).+?--\s*>|[^>]+>)|\[\[?(?:[^\[\]<>]|<[^>]+>)+\]\]?)/s
}}}
becomes
{{{
/(<(?(?=!--).+?--\s*>|[^>]++>)|\[\[?(?:[^\[\]<>]++|<[^>]++>)++\]\]?)/s
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12690#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list