Bug Tracker

Opened 8 years ago

Closed 8 years ago

#13701 closed feature (worksforme)

Add shtml method

Reported by: kangax@… Owned by: kangax@…
Priority: undecided Milestone: None
Component: unfiled Version: 1.9.1
Keywords: Cc:
Blocked by: Blocking:


We know that in order for a web server to recognize an SSI-enabled HTML file and carry out necessary instructions, the filename should end with a special .shtml extension.

It is therefore obvious that lack of shtml method in jQuery is a glaring mistake, and should be added as soon as possible.

Note that jQuery already has html method but not shtml one -- an inconsistency that should be avoided at all cost.

We should carefully plan the exact behavioral differences between new shtml method and existing html method (http://api.jquery.com/html/) in order to avoid breaking web compatibility across the extensive range of environments.

My suggestion is to consider returning only valid HTML2.0 markup (http://www.w3.org/MarkUp/html-spec/html-spec_toc.html) such as:

el.html(); // <span style="color:red;font-size:7px;font-weight:bold;text-decoration:underline">word</span>
el.shtml(); // <B><U><FONT SIZE=7 COLOR=RED>word</FONT></U></B

Change History (12)

comment:1 Changed 8 years ago by dmethvin

Owner: set to kangax@…
Status: newpending

Can you provide a test case, preferably one using a <marquee> tag?

comment:2 Changed 8 years ago by anonymous

+1. Really need this for emails.

comment:3 Changed 8 years ago by serbanghita@…

I don't get this feature request. Please explain:

  1. What is the connection between HTML 2.0 and SSI?
  2. Should the example presented work vice-verse?
  3. Can you provide some real life scenarios?

comment:4 Changed 8 years ago by rvision


comment:5 Changed 8 years ago by earl3s

I've run into a few scenarios with the blink tag that I could have used this on. +1 for me.

comment:6 Changed 8 years ago by Rick Waldron


comment:7 Changed 8 years ago by serbanghita@…


comment:8 Changed 8 years ago by anonymous

This is genius! We could also provide an API to build layouts using <TABLE>

comment:9 Changed 8 years ago by anonymous

Is the missing closing angle bracket on the


part of the spec? I need to review my regexes…

comment:10 Changed 8 years ago by ryanttb

jsFiddle of missing shtml function for setting content, plus failing html function to properly parse SSI instructions.


comment:11 Changed 8 years ago by ajpiano

Seems like we can close this now that April Fools is over? :)

comment:12 Changed 8 years ago by dmethvin

Resolution: worksforme
Status: pendingclosed
Note: See TracTickets for help on using tickets.