Menu

#2011 [url] tags not parsed correctly in BB

closed-fixed
Nukes (65)
5
2004-10-11
2004-09-01
No

When posting or previewing a message the [url] tags
aren't proccessed correctly. This affects both Nukes
1.1 cvs and whatever is running on jboss.org(1.0 I'm
guessing).

If two url's appear on the same line in a BB posting
then they will be displayed incorrectly. For
example(hoping HTML doesn't get stripped here..) the line:
[url]http://www.kde-look.org/index.html[/url] and
[url]http://art.gnome.org/[/url]

Will be rendered as:
<a href="http://www.kde-look.org/index.html[/url] and
[url]http://art.gnome.org/" target="_blank"
class="postlink">http://www.kde-look.org/index.html[/url]
and [url]http://art.gnome.org/</a>

At first glance this appears to be an issue with the
Lucene code in Nukes but I've never used Lucene so I
thought someone else might have an easier time at this one.

-Chase

Discussion

  • Julien Viet

    Julien Viet - 2004-09-03
    • assigned_to: nobody --> cooperfbi
    • status: open --> open-accepted
     
  • Matthieu Chase Heimer

    Logged In: YES
    user_id=1107487

    Turns out it was a JFLex issue. The regular expression
    matching was too greedy. The fix has been applied in the 1.1
    branch and is shown below.

    In
    /cvsroot/jboss/nukes/common/src/main/org/jboss/nukes/common/format/code/Analyzer.flex

    - "[url"~["]"].*"[/url]" { return token(LINK,
    yytext().substring(4, ytext().length() - 6)); }

    + "[url"[^"["]*"]"[^"["]*"[/url]" { return token(LINK,
    yytext().substring(4, yytext().length() - 6)); }

     
  • Matthieu Chase Heimer

    • status: open-accepted --> closed-fixed
     

Log in to post a comment.