Closed
Bug 458329
Opened 16 years ago
Closed 15 years ago
Canned responses don't fill review textarea properly if they contain double quotes
Categories
(addons.mozilla.org Graveyard :: Admin/Editor Tools, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
5.0.2
People
(Reporter: morgamic, Assigned: lorchard)
Details
Attachments
(2 files, 1 obsolete file)
4.11 KB,
patch
|
rdoherty
:
review+
|
Details | Diff | Splinter Review |
64.06 KB,
image/png
|
Details |
Not sure if this was the problem, but something like this wouldn't fill the textarea: In order to prevent conflicts with other addons that may be installed by users, you need to wrap your "loose" variables and functions within a JavaScript object. You can see an example of how to do this @ http://blogger.ziesemer.com/2007/10/respecting-javascript-global-namespace.html. Thanks. It would truncate on 'your'.
Assignee | ||
Comment 1•16 years ago
|
||
Need some more details here, like a URL or what canned responses where and in what textarea.
Target Milestone: --- → 5.0.2
This is happening on another canned response. The work around seems to be using single quotes. But still a bug regardless: STR: 1. View a pending queue from the editor's tools. 2. Select an addon to review 3. Hit 'Request Super Review' 4. From canned responses, choose remote xul or javascript. At the bottom, you will see : Option 2: Load it into an iframe marked type=
Assignee | ||
Comment 3•16 years ago
|
||
Now that I've had a chance to see how the review process works, I see the problem here. Select option values need some extra escaping to prevent breaking out of the value attribute. Patch attached
Assignee | ||
Comment 4•16 years ago
|
||
Also, fwiw: The better place to do this is in the CakePHP selectTag helper itself, but I'm hesitant to do that and see it clobbered if we upgrade CakePHP. Might be a good upstream fix to submit if it's not already handled. Might be a good follow up bug
Updated•16 years ago
|
Assignee: nobody → lorchard
Assignee | ||
Comment 5•16 years ago
|
||
Comment on attachment 355605 [details] [diff] [review] patch (-p1) to properly escape quotes and line breaks in the select options for canned responses I can has review?
Attachment #355605 -
Flags: review?(fwenzel)
Comment 6•16 years ago
|
||
(In reply to comment #4) > Also, fwiw: The better place to do this is in the CakePHP selectTag helper > itself, but I'm hesitant to do that and see it clobbered if we upgrade CakePHP. Hm, do you *want* to do it in the html helper? We subclass it anyway in views/helpers/addons_html.php. If you overwrote selectTag() there and added this, it may not hurt. Let me know what you think.
Assignee | ||
Comment 7•15 years ago
|
||
Following wenzel's advice, I dropped a modified version of selectTag into the AMO local subclass of the Cake HTML helper. On the upside, this should fix not only the current bug, but all other bugs like this one. On the downside, it changes the selectTag helper everywhere - while I don't think it should break anything, it does have a wide reach
Comment 8•15 years ago
|
||
Is this also the reason why "Option 2: Load it into an iframe marked type=" doesn't complete to "content"?
Assignee | ||
Comment 9•15 years ago
|
||
(In reply to comment #8) > Is this also the reason why "Option 2: Load it into an iframe marked type=" > doesn't complete to "content"? Yes, quotes aren't escaped, and so <option value=""> tags containing canned responses with quotes are broken in the HTML.
Assignee | ||
Updated•15 years ago
|
Attachment #360174 -
Flags: review?(rdoherty)
Assignee | ||
Comment 10•15 years ago
|
||
Comment on attachment 360174 [details] [diff] [review] patch (-p1) to properly escape select options in the AMO local version of HTML helper r? for rdoherty
Comment 11•15 years ago
|
||
Comment on attachment 360174 [details] [diff] [review] patch (-p1) to properly escape select options in the AMO local version of HTML helper Looks good and works.
Attachment #360174 -
Flags: review?(rdoherty) → review+
Assignee | ||
Comment 12•15 years ago
|
||
checked in as r22132
Assignee | ||
Updated•15 years ago
|
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Verified FIXED on preview.AMO
Status: RESOLVED → VERIFIED
Updated•15 years ago
|
Attachment #355605 -
Flags: review?(fwenzel) → review-
Updated•15 years ago
|
Attachment #355605 -
Attachment is obsolete: true
Updated•8 years ago
|
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•