Nested tags in option (select) are ignored and not rendered

RESOLVED INVALID

Status

()

RESOLVED INVALID
7 years ago
7 years ago

People

(Reporter: traturabura, Unassigned)

Tracking

14 Branch
x86
Windows XP
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
Created attachment 644915 [details]
screenshot.png - example of the issue. Texts are in polish.

User Agent: Mozilla/5.0 (Windows NT 5.1; rv:14.0) Gecko/20100101 Firefox/14.0.1
Build ID: 20120713134347

Steps to reproduce:

I have nested SPAN inside OPTION of a SELECT. SPAN has style attribute, but it does not matter - it can be "clear" span. Same happens if I have other tags.


Actual results:

The content of SPAN is rendered correctly while looking on the whole list of options, but when I choose the option, nested tags inside it disapear. It is still correctly rendered in the list, but the "chosen option" in SELECT does not contain the SPAN.


Expected results:

The "chosen" box should render the nested tags as the expanded "list of options", where it is correctly rendered.

Comment 1

7 years ago
Coul you attach a minimal testcase, please?
(Reporter)

Comment 2

7 years ago
Well, after a short research I realized that what I am doing is just a nonsense. The specfication of doctype does not provide any nested tags inside OPTION. Just #CDATA.

The only reason it worked for me, is that I forced appending the span through jquery:

var el = $("<option></option>");
el.attr("value",100);
el.html('Outside_span <span style="font-family:serif; font-size: 20px;">inside_span</span>.');
$("#my_select").append(el);

If there is a bug here, it is that I should not be able to add span in such manner. But the original question is resolved and i mark is as invalid.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.