String HTML methods (e.g. String.prototype.big) aren’t XHTML-compliant - by MathiasBynens

Status : 

  By Design<br /><br />
		The product team believes this item works according to its intended design.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


ID 752283 Comments
Status Closed Workarounds
Type Bug Repros 4
Opened 7/4/2012 5:01:11 AM
Access Restriction Public

Description

IE is the only browser who returns uppercased tag names, e.g.:

> '_'.big();
'<BIG>_</BIG>'

Every other browser returns, e.g.:

> '_'.big();
'<big>_</big>'

Here’s a list of the methods that have this issue:

* String.prototype.anchor(name)
* String.prototype.big()
* String.prototype.blink()
* String.prototype.bold()
* String.prototype.fixed()
* String.prototype.fontcolor(color)
* String.prototype.fontsize(size)
* String.prototype.italics()
* String.prototype.link(href)
* String.prototype.small()
* String.prototype.strike()
* String.prototype.sub()
* String.prototype.sup()

By having the tag names be lowercased, the resulting strings can be used in XHTML as well. Now that IE supports XHTML it would be useful to have this functionality. Also, this change would improve interoperability, as it would make IE’s behavior the same as that of other browsers.

FWIW, Firefox had the same bug in 2001 but fixed it: https://bugzilla.mozilla.org/show_bug.cgi?id=76054

Spec for these non-standard methods: http://mathias.html5.org/specs/javascript/#string
Sign in to post a comment.
Posted by Microsoft on 7/30/2013 at 11:18 AM
Thank you for your feedback. We have taken your feedback into consideration. We will review and assess if this makes sense to implement in the next version of Internet Explorer. At this time we do not plan on fixing this issue in the current release. Your feedback is very important to us, and it helps us improve the quality of Internet Explorer. We continue to welcome more feedback, so please don't hesitate to report other ways that we can improve Internet Explorer.

Best regards,
The Internet Explorer Team
Posted by Microsoft on 7/5/2012 at 11:23 AM
Thank you for your feedback. We will be investigating this issue further.

Best regards,

The Internet Explorer Team
Posted by DanglingPointer on 7/5/2012 at 9:01 AM
@MathiasBynens, yes this is the issue. IE converts all tags to uppercase without respecting case used in the source code. Just one question, if the web developer used <BIG></BIG> in the source code, would the expected result be <BIG></BIG> or <big></big>? Same goes for mixed case <biG> ?
Posted by MathiasBynens on 7/5/2012 at 5:59 AM
Note that the attribute names in the output generated by these are currently uppercased too. They should be lowercased as well.