Last modified: 2014-06-08 12:47:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68203, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66203 - Hovercards: Regex for title bolding in popup doesn't escape title
Hovercards: Regex for title bolding in popup doesn't escape title
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Popups (Other open bugs)
unspecified
All All
: Unprioritized major with 1 vote (vote)
: ---
Assigned To: Prateek Saxena
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-06-05 17:23 UTC by Nihiltres
Modified: 2014-06-08 12:47 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
"C" in "ANSI C" is bolded, but not "C*" (32.86 KB, image/png)
2014-06-05 17:23 UTC, Nihiltres
Details

Description Nihiltres 2014-06-05 17:23:47 UTC
Created attachment 15571 [details]
"C" in "ANSI C" is bolded, but not "C*"

In ext.popups.renderer.article.js, the article.getProcessedHtml function bolds instances of the article title. However, it doesn't escape the title text provided to the regex it uses to search, and some titles contain regex syntax, causing odd results.
Comment 1 Gerrit Notification Bot 2014-06-06 04:24:44 UTC
Change 137862 had a related patch set uploaded by Prtksxna:
renderer.article: Escape RegExp syntax from the article's title

https://gerrit.wikimedia.org/r/137862
Comment 2 Laurence 'GreenReaper' Parry 2014-06-08 12:43:09 UTC
This issue blocks popups from appearing in some cases, giving for example:
  Uncaught SyntaxError: Invalid regular expression: /(^|\s)(FurryDC++)(\s|$)/: Nothing to repeat 

The included patch appears to resolve this issue.
Comment 3 Gerrit Notification Bot 2014-06-08 12:46:18 UTC
Change 137862 merged by jenkins-bot:
renderer.article: Escape RegExp syntax from the article's title

https://gerrit.wikimedia.org/r/137862
Comment 4 Bartosz Dziewoński 2014-06-08 12:47:31 UTC
Fixed, patch will be deployed within two weeks per the roadmap ([[mw:MediaWiki 1.24/Roadmap]]), unless it's backported earlier.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links