eccsup / jwpl

Automatically exported from code.google.com/p/jwpl
0 stars 0 forks source link

Bug in title regex? #87

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I found these 4 valid Wikipedia page titles that are somehow messed up by the 
Title.java class.

http://en.wikipedia.org/wiki/F(x)_(band)
http://en.wikipedia.org/wiki/(((GRRRLS)))
http://en.wikipedia.org/wiki/Y(4140)
http://en.wikipedia.org/wiki/L(R)

Try this code:

Title title = new Title("F(x)_(band)");
System.out.println(title.getWikiStyleTitle());
Title title2 = new Title("(((GRRRLS)))");
System.out.println(title2.getWikiStyleTitle());
Title title3 = new Title("Y(4140)");
System.out.println(title3.getWikiStyleTitle());
Title title4 = new Title("L(R)");
System.out.println(title4.getWikiStyleTitle());

Output is:
_(x)_(band)
_((GRRRLS)))
_(4140)
_(R)

Seems like the first character in front of an opening bracket is replaced by 
"_", that probably shouldn't happen.

Original issue reported on code.google.com by SamyAt...@googlemail.com on 5 Apr 2012 at 10:31

GoogleCodeExporter commented 9 years ago
Sry, I just saw now that this issue was already reported as issue 81 and a 
patch was supplied.

Original comment by SamyAt...@googlemail.com on 5 Apr 2012 at 10:43

GoogleCodeExporter commented 9 years ago

Original comment by oliver.ferschke on 22 Apr 2012 at 10:52