Last modified: 2014-10-17 11:45:27 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 T67138, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 65138 - Hovercards: Fix the bracket removal code
Hovercards: Fix the bracket removal code
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Popups (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-10 14:21 UTC by Prateek Saxena
Modified: 2014-10-17 11:45 UTC (History)
7 users (show)

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


Attachments

Description Prateek Saxena 2014-05-10 14:21:50 UTC
Read the string character by character in JavaScript instead of using Regular Expressions.
Comment 1 Prateek Saxena 2014-05-10 14:22:52 UTC
The current implementation has the following problem - http://rubular.com/r/DDFhG1LaNt 

We need to select and remove only the first level of brackets.
Comment 2 Gerrit Notification Bot 2014-05-28 12:04:58 UTC
Change 135759 had a related patch set uploaded by Prtksxna:
render.article: Remove brackets using code instead of RegExp

https://gerrit.wikimedia.org/r/135759
Comment 3 Quiddity 2014-06-05 03:28:10 UTC
However, see also https://www.mediawiki.org/w/index.php?title=Talk:Beta_Features/Hovercards&workflow=rvrf5mi32feehqf3 

Re-factored copy of the first comment in that topic:

Hovercards don't appear to render text in brackets from the target page. For instance, hovercards concerning the Wikipedia page for [[RAF Hospital Wegberg]] state that it is 
  "commonly abbreviated to RAFWegberg"
while the page itself states that it is 
  "commonly abbreviated to RAF(H) Wegberg"
both the '(H)' and the space after it appear to be missed by the hovercard.


See the thread for full discussion.

This 'bracket removal' might need to be re-examined. (Note that it's something Navpopups gets wrong, too. Not an easy problem to solve.)
Comment 4 Prateek Saxena 2014-06-05 03:44:34 UTC
(In reply to Quiddity in comment #3)

The space after the bracket problem will get fixed with this patch. Do we also want to remove stuff inside square brackets, as mentioned by Sasuke_Sarutobi?

Is it a possibility that we'll have to be much smarter about this and not blindly remove things within brackets?
Comment 5 Derk-Jan Hartman 2014-06-05 09:27:26 UTC
Navpopups just skips templates altogether, so that is a different problem in that regard.
Comment 6 Quiddity 2014-06-05 19:39:50 UTC
(In reply to Prateek Saxena from comment #4)
> (In reply to Quiddity in comment #3)
> 
> The space after the bracket problem will get fixed with this patch. Do we
> also want to remove stuff inside square brackets, as mentioned by
> Sasuke_Sarutobi?
> 
> Is it a possibility that we'll have to be much smarter about this and not
> blindly remove things within brackets?

That's a question for Dan. CCing.
Comment 7 Gerrit Notification Bot 2014-06-24 08:12:56 UTC
Change 135759 merged by jenkins-bot:
render.article: Remove brackets using code instead of RegExp

https://gerrit.wikimedia.org/r/135759
Comment 8 Andre Klapper 2014-08-17 11:23:26 UTC
All patches mentioned in this report were merged - is there more work left to do here (if yes: please reset the bug report status to NEW or ASSIGNED), or can you close this ticket as RESOLVED FIXED?
Comment 9 Andre Klapper 2014-10-17 11:45:27 UTC
No reply to comment 8.
All patches mentioned in this report were merged or abandoned - assuming this bug is FIXED. If that is not the case: Please reopen and elaborate what is left to do here to get this report fixed.

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


Navigation
Links