Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: Can I use Textpattern to... output HTML 4.01 code?
> thebombsite wrote:
> And if we go down the <code>application/xhtml+xml</code> route does this mean that we really don’t
> want visitors being able to use mark-up in comments??
I’m not a fan of letting them enter markup directly in any case; to me, it’s better from a security perspective to use Textile or another “light” markup language which can be translated into well-formed XHTML. That way you don’t have to worry about your “allowed elements” filter, and you can safely escape anything that looks like raw HTML.
You cooin’ with my bird?
Offline
Re: Can I use Textpattern to... output HTML 4.01 code?
If the only change to revert back to HTML 4.01 is to close tags in a different way (> instead of />), maybe a simple option as a radio button in TXP admin-side could do the job and make happpy everybody.Something like: “I want TXP to output: – XHTML – HTML”
I don’t see any tangible benefit and only clutter in the preferences, because as ubernostrum writes:
“Again, XHTML 1.0 and HTML 4.01 are identical except for syntax.”
All the problems mentioned relate to using “xhtml+xml” http-header which is not required for a valid xhtml document: http://www.w3.org/TR/xhtml1/#media
Such needs are best served by plugins.
Offline
Re: Can I use Textpattern to... output HTML 4.01 code?
Sencer, it’s technically “not needed”, but the W3C Note on XHTML media types says XHTML SHOULD (that’s an RFC “SHOULD”) be served as application/xhtml+xml
. Also, I wonder what the point of reformulating HTML in XML is if we just turn around and say “don’t bother trying to treat it as XML”.
You cooin’ with my bird?
Offline
Re: Can I use Textpattern to... output HTML 4.01 code?
Yes, SHOULD, but not MUST. It also explicitly says you can use text/html.
I wonder what the point of reformulating HTML in XML is
The benefit? It’s for tool vendors like us and many others (like users, designers etc.) who can work with a “single way” of doing stuff and don’t have to switch between “old way” and “new way”.
Nobody says you should go back and change all your existing sites, but when building new sites why not use XHTML with a text/html mimetype? Anyway, I don’t have to understand this, I am sure people have their reasons, I just don’t see it being of wide interest.
Offline
Re: Can I use Textpattern to... output HTML 4.01 code?
> Sencer wrote:
> Yes, SHOULD, but not MUST. It also explicitly says you can use text/html.
Which carries the connotation of “really you ought to do this, don’t blame us if things break when you try something else”.
> The benefit? It’s for tool vendors like us and many others (like users, designers etc.) who can work with a
> “single way” of doing stuff and don’t have to switch between “old way” and “new way”.
A lot of that perceived benefit is in what third parties can do with your output and standard XML tools. Which, frankly, isn’t a whole lot if you’re not serving it as an XML mime-type.
> I am sure people have their reasons, I just don’t see it being of wide interest.
A lot of the reasoning is a desperate desire to “get it right” from the outset with XHTML; SGML-based HTML became bogged down in such a morass of conflicting standards and lax parsing that it’s basically impossible to to interesting things with Web pages and SGML tools. Reformulating in XML, which would, in theory, force draconian strictness, was seen by some as a way to get out of that mess by making a clean start with clear rules — if you’re not well-formed, your page doesn’t display.
But then everybody jumped on the bandwagon, declaring XHTML 1.0 the latest and greatest spec, and it went into wide adoption before there was actual browser support for serving/parsing it as XML. And since the W3C said it was acceptable to serve XHTML 1.0 as text/html
to legacy user-agents, provided it met certain compatibility guidelines, people just shrugged and said, “Why should I care about the MIME-type? The W3C says it’s OK to do it this way!” And thus one of the great promises of HTML became a stillborn pipe dream.
To my mind, text/html
for XHTML was a necessary compromise, but should have been clearly labeled as akin to using the font
tag; deprecated, still allowed as a last resort in legacy cases (provided you’re working to transition away in the future), but anything being built fresh and new ought to avoid it as much as possible.
You cooin’ with my bird?
Offline
Re: Can I use Textpattern to... output HTML 4.01 code?
And here is another interesting point.
You cooin’ with my bird?
Offline