Last modified: 2014-09-23 23:53:25 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 T35886, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33886 - to support for microdata and rdfa, allow <a> tags so external links can have ref/rel attributes
to support for microdata and rdfa, allow <a> tags so external links can have ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.20.x
All All
: Low enhancement with 1 vote (vote)
: Future release
Assigned To: Daniel Kinzler
:
: 9666 18460 26727 (view as bug list)
Depends on:
Blocks: 23225 27334
  Show dependency treegraph
 
Reported: 2012-01-22 20:58 UTC by Daniel Kinzler
Modified: 2014-09-23 23:53 UTC (History)
9 users (show)

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


Attachments
sanitizer patch to allow <a> tags (3.38 KB, patch)
2012-01-22 20:58 UTC, Daniel Kinzler
Details
parser patch to handle <a> tags and put urls into externallinks table (5.32 KB, patch)
2012-01-23 02:02 UTC, Daniel Kinzler
Details
improved parser patch to handle <a> tags and put urls into externallinks table (5.71 KB, patch)
2012-01-29 19:50 UTC, Daniel Kinzler
Details

Description Daniel Kinzler 2012-01-22 20:58:46 UTC
Created attachment 9887 [details]
sanitizer patch to allow <a> tags

Allow <a> tags in wikitext. This was introduced first in r58694 and again discussed in the context of but reverted. I have again introducde it in r109723 after a discussion with tim, but reverted it because of code slush as requested by siebrand. 

The attached patch will allow <a> tags to be passed through the sanitizer, if $wgAllowATag is set to true. I will soon supply another patch that will cause such links to be recorded in the externallink table, as discussed with tim.

Please apply once 1.19 is forked.
Comment 1 Daniel Kinzler 2012-01-23 02:02:47 UTC
Created attachment 9890 [details]
parser patch to handle <a> tags and put urls into externallinks table

this patch adds a pass to the parser that will handle the href attribute from any <a> tags and put the url contained there into the externallinks table.

the patch also contains some parser test cases for making sure this doesn't break.
Comment 2 Tim Starling 2012-01-23 02:13:48 UTC
If there's any way for an <a> tag to sneak through without being added to mOutput, then that will be a vulnerability for SpamBlacklist/AbuseFilter etc. allowing links to be added without being properly flagged. So it's really important that the regex in doHtmlLinks() matches at least as many links as the one in Sanitizer::removeHTMLtags(). So I'd suggest using \W instead of \s to detect the end of the tag name.

Otherwise, looks good.
Comment 3 Sumana Harihareswara 2012-01-23 19:46:35 UTC
(In reply to comment #2)
Marking reviewed - Daniel, please revise & resubmit. Thanks.
Comment 4 Daniel Kinzler 2012-01-29 19:50:27 UTC
Created attachment 9923 [details]
improved parser patch to handle <a> tags and put urls into externallinks table

changed the regex as per tim's suggestion. using [^>\w] instead if \W so <a> isn't matched.
Comment 5 Daniel Kinzler 2012-03-29 10:54:29 UTC
Re-submitted for 1.20 in Ic5355ef1812d449c13f45a8aafc5b5121daf0cc3 see https://gerrit.wikimedia.org/r/#change,3912

Review pending in gerrit.
Comment 6 Jarry1250 2012-04-12 20:25:09 UTC
*** Bug 9666 has been marked as a duplicate of this bug. ***
Comment 7 Jarry1250 2012-04-12 20:28:17 UTC
*** Bug 18460 has been marked as a duplicate of this bug. ***
Comment 8 Helder 2012-06-18 11:53:08 UTC
Will this allow one to use the "style" attribute to change the underline color of [[links]] on mouseover?

Currently this is only possible using the deprecated <font> tag as in

[[#|<font color="#FF0000">MMMMMMMM</font>]]

because

[[#|<span style="color:#FF0000;">MMMMMMMM</span>]]

only changes the text color:

https://en.wikipedia.org/w/index.php?title=Wikipedia:Sandbox&oldid=498164292#Link_color
Comment 9 Daniel Friesen 2012-08-06 09:31:05 UTC
These patches should probably properly integrate with the other parts of our link handling. We want things like the external link class to be applied properly.
Comment 10 MZMcBride 2012-09-19 00:37:21 UTC
(In reply to comment #5)
> Re-submitted for 1.20 in Ic5355ef1812d449c13f45a8aafc5b5121daf0cc3 see
> https://gerrit.wikimedia.org/r/#change,3912
> 
> Review pending in gerrit.

This change set was abandoned. Why is that?
Comment 11 Mark A. Hershberger 2012-09-30 16:15:42 UTC
(In reply to comment #10)
> This change set was abandoned. Why is that?

I've no clue, but abandonment shows that this doesn't have anyone pushing it for tarball, so not blocking.
Comment 12 Sumana Harihareswara 2012-10-12 02:17:43 UTC
Comment on attachment 9887 [details]
sanitizer patch to allow <a> tags

I presume this was obsoleted by the patchset in Gerrit
Comment 13 Sumana Harihareswara 2012-10-12 02:17:59 UTC
Comment on attachment 9923 [details]
improved parser patch to handle <a> tags and put urls into externallinks table

I presume this was obsoleted by the patchset in Gerrit
Comment 14 Helder 2014-01-16 12:47:59 UTC
*** Bug 26727 has been marked as a duplicate of this bug. ***

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


Navigation
Links