Closed Bug 570083 Opened 16 years ago Closed 16 years ago

[k] Internal link hook throws parse error for invalid syntax

Categories

(support.mozilla.org :: Forum, task, P2)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: paulc, Assigned: jsocol)

References

()

Details

STR: 1. Create a post with this content: [[Internal link|title|again]] Expected: Thread loads, showing a link, probably: <a href="/kb/Internal+link|title">again</a> Actual: 500 ISE. File "/data/www/support-stage-new.mozilla.com/kitsune/apps/sumo/utils.py", line 66, in hookInternalLink link, text = link.split('|') ValueError: too many values to unpack Should be easy to fix, likely just replace |.split('|')| with |.rsplit('|', 1)|
Assignee: nobody → paulc
(In reply to comment #0) > Expected: > Thread loads, showing a link, probably: > <a href="/kb/Internal+link|title">again</a> Expected in this case should be <a href="/kb/Internal+link">again|title</a> i.e.: use lsplit instead of rsplit.
(In reply to comment #1) > i.e.: use lsplit instead of rsplit. Actually, do we know how lsplit and rsplit will interact with RTL text? Is it possible to use split with a limit and have it follow the text direction?
Assignee: paulc → james
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Verified FIXED; no tracebacks, and no 500 Internal Server Error.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.