https://bugzilla.wikimedia.org/show_bug.cgi?id=70743
Bug ID: 70743
Summary: Parsoid base URL should be independent of page
Product: Parsoid
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: DOM
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Web browser: ---
Mobile Platform: ---
Currently Parsoid sets the URL of the page itself as the base URL. This means
that [[OS/2]] has <base href="//en.wikipedia.org/wiki/OS/2">, which means that
links on that page have to look like <a href="../Unix"> in order to point to
the right place.
This practice is evil and should die in a fire. Instead, the base URL should be
set to the base URL of the wiki, e.g. <base href="//en.wikipedia.org/wiki">.
The fact that the base URL currently depends on the page name causes lots of
problems.
Mixing content from multiple pages (like in Flow) is hard, because you have to
normalize away all the <base> differences. Even embedding content from one page
standalone is difficult because Parsoid's (variable) choice for the base URL is
not a reasonable choice for your entire UI's base URL.
Creating new content (like in VE) would be hard if it weren't for the fact that
Parsoid tolerates <a href="Foo"> where it would really expect <a
href="../Foo">. If VE had to actually produce correct hrefs in its output, it
would have to do some pretty evil analysis of the base URL.
Copying content from one page to another is hit by both issues: you have to
process the hrefs of copied links based on both the source's base URL and the
destination's base URL, which is quite error-prone.
This change has been discussed before and everyone seems to agree that it
should happen, but it hasn't happened yet, so let's start tracking it here.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l