Open Bug 848410 Opened 11 years ago Updated 3 years ago

Firefox ESR 17.0.3 is not properly encoding selectlist option values.

Categories

(Core :: DOM: Serializers, defect, P5)

17 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: kdpeders2002, Unassigned)

Details

Attachments

(1 file)

Attached file firefox.html
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20100101 Firefox/17.0
Build ID: 20130215125822

Steps to reproduce:

When setting Option Values via JavaScript Firefox should properly encode all items (e.g. <, >, and &) and not just ampersand (&).
By encoding only ampersand (&) users are then unable to properly encode option values by setting the value to something like '1&lt;2'


Actual results:

Attached is a simple webpage demonstraiting this.  The string '&lt;&gt;&<>&' is added to Option text and value via HTML and JavaScript (multiple ways).

JavaScript Output is as follows:
Option1: 
	innerHTML:&lt;&gt;&amp;&lt;&gt;&amp;
	value:<>&<>&

Option2: 
	innerHTML:&lt;&gt;&amp;&lt;&gt;&amp;
	value:&lt;&gt;&<>&

Option3: 
	innerHTML:&amp;lt;&amp;gt;&amp;&lt;&gt;&amp;
	value:&lt;&gt;&<>&

Select innerHTML:
      <option id="option1" value="<>&amp;<>&amp;">&lt;&gt;&amp;&lt;&gt;&amp;</option>
      <option value="&amp;lt;&amp;gt;&amp;<>&amp;" id="option2">&lt;&gt;&amp;&lt;&gt;&amp;</option>
      <option value="&amp;lt;&amp;gt;&amp;<>&amp;">&amp;lt;&amp;gt;&amp;&lt;&gt;&amp;</option>


Expected results:

Previous Firefox versions ESR-10 returned Option Values in an encoded state (e.g. > was returned as &gt;)

If this were working correctly each Option should have the same text and value.  (This worked in version ESR-10).
Attachment #721755 - Attachment mime type: text/plain → text/html
Is it a dupe of bug 788444?
Component: Untriaged → Serializers
Product: Firefox → Core

Bulk-downgrade of unassigned, >=5 years untouched DOM/Storage bugs' priority.

If you have reason to believe this is wrong (especially for the severity), please write a comment and ni :jstutte.

Severity: normal → S4
Priority: -- → P5
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: