Patch (to be ported)
Project:
TWikifilter
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
17 Mar 2009 at 22:33 UTC
Updated:
1 May 2009 at 20:53 UTC
Jump to comment: Most recent file
The regex for matching standalone WikiWords (i.e., those without squarebrackets) seems to be a bit too liberal. For example, it picks up WikiWords in the following contexts, which I think it should try to avoid:
<a title="WikiWord" /> (linking should be avoided for all html tag attributes)
<a>WikiWord</a> (linking should be avoided for the ctext of the html anchor tag)
/private/var/tmp/WikiWord
(Perhaps this might be a good opportunity to write some simpletests? :^] )
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | twikifilter_match_restriction.patch | 1.34 KB | smokris |
Comments
Comment #1
mradcliffeThank you kind sir for your information seeking only request.
made a commit.
Comment #2
smokrisThanks, Matt. This seems to fix case #2 ("avoid linking to ctext within html anchor tag").
The fix doesn't address singleton HTML tags, so #1 is still broken. Adding
$htmlsingletonregex = "<[^>]+\/>";works for me.#3 can be addressed by adding something like
$pathregex = "(\/[\w\-]+)+\/?";.I've attached a patch that fixes these additional cases.
Also, I noticed your modification changed the CSS classes:
Is this a permanent change?
Comment #3
mradcliffe