Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFInput and others with

Advocate ,
Sep 12, 2008 Sep 12, 2008
I'm using CF8 and when I validate my HTML using the www.w3.org validator and I receive the following:

Line 848, Column 89: NET-enabling start-tag requires SHORTTAG YES.
…pe="text" maxlength="50" size="35" /></td>
The sequence <FOO /> can be interpreted in at least two different ways, depending on the DOCTYPE of the document. For HTML 4.01 Strict, the '/' terminates the tag <FOO (with an implied '>'). However, since many browsers don't interpret it this way, even in the presence of an HTML 4.01 Strict DOCTYPE, it is best to avoid it completely in pure HTML documents and reserve its use solely for those written in XHTML.


I think I narrowed it down to the fact that I am using <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " http://www.w3.org/TR/html4/loose.dtd"> -- which does not expect "/>" at the end of single short tags like <input ...> tags. CF5 did not do this. Is there a wy to turn off this behaviour in CF8?

Example:

<form ...>
<input type="text" name="firstname" />
...
</form>

needs to be:

<form ...>
<input type="text" name="firstname">
...
</form>
434
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 12, 2008 Sep 12, 2008
Steve Sommers wrote:
> CF5 did not do this. Is there a
> way to turn off this behaviour in CF8?

I doubt it, not with the bad reputation ColdFusion had for breaking
compliant pages in earlier versions.

Is that an actually error that prevent validation or just a warning?

Anyway, if it concerns you there are ways to modify your return stream
before it is sent to the browser. The couple of times I've done this
I've used the <onReqeust...> method of an Application.cfc file. The
documentation has examples as does many other sites on the Internets
available or a search.

Be warned and read all the caveats because there are serious
ramifications for some other ColdFusion functionality if you start
morphing with the request like this.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Sep 12, 2008 Sep 12, 2008
LATEST
It is showing up as a warning, but it still bugs me. Someday I'll change the entire site to use <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> instead, then CF8 works great, but that is a bigger project that I have time to tackle right now.

Thanks.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources