Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#14583 closed bug (notabug)

Jqeury .html(data) doesn't recognize chars "-" and '.'

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.11.0-beta2
Keywords: Cc:
Blocked by: Blocking:

Description

Execute:

$('BODY').html('<live-messenger />');

It will be replaced by '<live-messenger></live>' string. The problem is related to rxhtmlTag regex.

Change History (4)

comment:1 Changed 9 years ago by anonymous

.html() is for HTML. '<live-messenger />' is not HTML.

comment:2 Changed 9 years ago by gibson042

Resolution: notabug
Status: newclosed

Spec reference: http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#syntax-tag-name

HTML elements all have names that only use alphanumeric ASCII characters.

...but possibly another case for exposing rxhtmlTag and the replacement value as suggested at http://bugs.jquery.com/ticket/14464#comment:2.

comment:3 Changed 9 years ago by [email protected]

Here is an example that uses syntax compatible with html spec:

$('BODY').html('<textarea><live-messenger /></textarea>');

comment:4 in reply to:  3 Changed 9 years ago by gibson042

Replying to [email protected]:

Here is an example that uses syntax compatible with html spec:

$('BODY').html('<textarea><live-messenger /></textarea>');

That has nothing to do with recognition of "-" or "." (e.g., <textarea><contents /></textarea> is affected in the same way), and is in fact an entirely separate issue: #14370

Note: See TracTickets for help on using tickets.