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)
support.mozilla.org
Forum
Tracking
(Not tracked)
VERIFIED
FIXED
2.1
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)|
| Reporter | ||
Updated•16 years ago
|
Assignee: nobody → paulc
| Reporter | ||
Updated•16 years ago
|
| Assignee | ||
Comment 1•16 years ago
|
||
(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.
| Assignee | ||
Comment 2•16 years ago
|
||
(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 | ||
Updated•16 years ago
|
Assignee: paulc → james
| Assignee | ||
Comment 3•16 years ago
|
||
http://github.com/jsocol/kitsune/commit/5f7158ee67d
Pull requests sent for r?
| Assignee | ||
Updated•16 years ago
|
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Comment 4•16 years ago
|
||
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.
Description
•