Project:TWikifilter
Version:6.x-2.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:mradcliffe
Status:patch (to be ported)

Issue Summary

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? :^] )

Comments

#1

Status:active» patch (to be ported)

Thank you kind sir for your information seeking only request.

made a commit.

#2

Thanks, 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:

  • "twikifilter-wikiword" became "wiki"
  • "twikifilter-newwikiword" became "wikinew"

Is this a permanent change?

AttachmentSize
twikifilter_match_restriction.patch 1.34 KB

#3

Version:6.x-1.x-dev» 6.x-2.x-dev
Assigned to:Anonymous» mradcliffe
nobody click here