Closed Bug 702290 Opened 14 years ago Closed 6 years ago

Wiki parser generates invalid HTML when MEDIA_URL includes the host

Categories

(support.mozilla.org :: Knowledge Base Software, task, P5)

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: jsocol, Unassigned)

Details

(Keywords: good-first-bug)

Attachments

(1 file)

Setting MEDIA_URL to a full or protocol-relative URL, including the hostname, causes 3 tests in sumo.tests.test_parser to fail (at least for me). It's related to our image lazy-loading: the src attribute of the <img> inside the <noscript> gets turned into a link, meaning it looks like <noscript><img src="<a href="//path/to/image">...</a>"></noscript> Ricky can't reproduce it, which is further interesting. But it we want to push more content onto the CDN we will have to make sure this is just my VM and not a real problem.
So, we narrowed this down further (details in regex): MEDIA_URL = '(https?:)?//' + 'localhost(:8000)?' -> works 'localhost.localdomain(:8000)?' -> works 'example.com(:8000)?' -> FAILS + '/media/' That leads me to suspect it's from pywikimarkup's naive URL linkification.
Summary: Wiki parser may generate invalid HTML when MEDIA_URL includes the host → Wiki parser generates invalid HTML when MEDIA_URL includes the host
Attached patch a failing testSplinter Review
Here's a patch that demos a failing test because of this bug.
Cleaning up 2011Q4
Target Milestone: 2011Q4 → ---
hey we have a reproducible failing test, sounds like something for good first bug
Keywords: good-first-bug
Priority: -- → P5
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: