Last modified: 2014-03-02 03:00:50 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 T48027, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46027 - Parsoid: Improve handling of links without rel types
Parsoid: Improve handling of links without rel types
Status: REOPENED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Gabriel Wicke
:
Depends on: 49484
Blocks:
  Show dependency treegraph
 
Reported: 2013-03-12 13:57 UTC by Ed Sanders
Modified: 2014-03-02 03:00 UTC (History)
5 users (show)

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


Attachments

Description Ed Sanders 2013-03-12 13:57:38 UTC
After editing the link text of external links which consist of just the full url in MediaWiki syntax (and therefore render as <a rel="mw:ExtLink/URL" href="http://google.com">http://google.com</a> in HTML), the diff shows no change. 

There is also a question of confusing the user here as they may assume the link text and the url are somehow automatically linked, whereas currently the link inspector always deals with them separately.

Perhaps we need another mode for the link inspector when dealing with "mw:ExtLink/URL" where the link text and the url are kept the same until the user explicitly says otherwise.
Comment 1 Ed Sanders 2013-05-22 12:58:11 UTC
Another issue this presents is that opening a document and typing in a full URL suggests that your text will be plain, when in fact it is autolinked. Re-opening the page after saving and you now have linked text.

This could all be fixed in Parsoid with the following rules:

Label matches URL (and has no annotations)
html: <a href="http://www.google.com">http://www.google.com</a>
wiki: http://www.google.com

Plain text URL with no link annotation
html: http://www.google.com
wiki: <nowiki>http://www.google.com</nowiki>

Label doesn't match URL (already works)
html: <a href="http://www.google.com">http://www.google.co.uk</a>
wiki: [http://www.google.com http://www.google.co.uk]

The case with annotations also already works as expected:
html: http://www.<b>google</b>.com
wiki: http://www.'''google'''.com
(which disables the auto linker)
Comment 2 Ed Sanders 2013-06-18 14:30:07 UTC
As Gabriel noted we'll still need to keep mw:ExtLink/Numbered preserved (either via the UI, or by seeing if the label is still '[n]'), but this is essentially a Parsoid issue.
Comment 3 Gerrit Notification Bot 2013-06-29 03:11:11 UTC
Change 71162 had a related patch set uploaded by GWicke:
Bug 46027: Drop mw:ExtLink/URL

https://gerrit.wikimedia.org/r/71162
Comment 4 Gabriel Wicke 2013-06-29 04:42:40 UTC
Should be fixed once the above patch is merged.
Comment 5 Gerrit Notification Bot 2013-06-29 05:12:29 UTC
Change 71162 merged by jenkins-bot:
Bug 46027, bug 49484: Drop mw:ExtLink/URL

https://gerrit.wikimedia.org/r/71162
Comment 6 Andre Klapper 2013-07-04 10:34:49 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]
Comment 7 Ed Sanders 2013-07-04 11:27:02 UTC
This case has not yet been implemented yet:

Label matches URL (and has no annotations)
html: <a href="http://www.google.com">http://www.google.com</a>
wiki: http://www.google.com
Comment 8 Ed Sanders 2013-07-04 11:27:48 UTC
* delete a 'yet' as you prefer :(
Comment 9 James Forrester 2013-11-26 22:44:38 UTC
Is this now fixed?
Comment 10 Andre Klapper 2014-01-23 15:23:10 UTC
(In reply to comment #9 by jforrester)
> Is this now fixed?

Ed: Do you know?
Comment 11 Gabriel Wicke 2014-01-23 16:26:32 UTC
We still require the rel="mw:ExtLink" attribute. This serializes to just 'http://www.google.com':

<a rel="mw:ExtLink" href="http://www.google.com">http://www.google.com</a>

Per discussion on wikitext-l, we'll likely drop the rel requirement in the future, which would make even this work:

<a href="http://www.google.com">http://www.google.com</a>

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


Navigation
Links