Closed Bug 1332886 Opened 9 years ago Closed 9 years ago

Kumascript error when rendering non-ASCII URLs

Categories

(Developer Documentation Graveyard :: General, defect, P5)

All
Other
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cswcsy, Assigned: rjohnson)

References

()

Details

:: Developer Documentation Request Request Type: Correction Gecko Version: unspecified Technical Contact: :: Details https://developer.mozilla.org/ko/docs/Web/SVG/Tutorial/%EC%9C%84%EC%B9%98 occur error but i don't know why
Summary: kumascript error → kumascript error on Korean translation of SVG tutorial
I can confirm this is an issue in my developer environment. On our rendering server, we recently upgraded from node v0.10 to v6, and upgraded some 3rd party libraries as well. It appears that rendering pages with non-ASCII titles were affected. The rendering server is making this request for the page source: GET /en-US/docs/ko/Web/SVG/Tutorial/ܑX0?raw=1 The correct request would be: GET /en-US/docs/ko/Web/SVG/Tutorial/ܑ%EC%9C%84%EC%B9%98?raw=1
Assignee: nobody → rjohnson
Status: UNCONFIRMED → NEW
Ever confirmed: true
The proposed fix has been merged to master: https://github.com/mozilla/kumascript/commit/264935a36b2bf0fb452a69bddfbd58c143cbbb58 It seems that this was due to a change in the "express" node package, specifically its "req.params" property. In the past, the values of this property must have been taken as-is from the incoming URL (so left escaped), but now they are un-escaped, leading to a bad raw document URL for Kuma.
My fix was bad. By using querystring.escape, I was also url-encoding/escaping the slashes within the doc path. Changed to use encodeURI instead. https://github.com/mozilla/kumascript/pull/98
Thanks Ryan! Latest master works great for me in my local environment.
A further change was needed in the deployment scripts to get the rendering engine to use the latest code: https://github.com/mozilla/kuma/pull/4106 The fix has been deployed to staging and production, and the three URLs render without error: https://developer.mozilla.org/ko/docs/Web/SVG/Tutorial/%EC%9C%84%EC%B9%98 https://developer.mozilla.org/fr/docs/Web/JavaScript/H%C3%A9ritage_et_cha%C3%AEne_de_prototypes https://developer.mozilla.org/fr/docs/Web/JavaScript/Une_r%C3%A9introduction_%C3%A0_JavaScript
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Summary: kumascript error on Korean translation of SVG tutorial → Kumascript error when rendering non-ASCII URLs
You need to log in before you can comment on or make changes to this bug.