Development

#512 (sfFillInFormFilter not generating XHTML complaint output)

You must first sign up to be able to contribute.

Ticket #512 (closed enhancement: fixed)

Opened 4 years ago

Last modified 3 years ago

sfFillInFormFilter not generating XHTML complaint output

Reported by: tamcy Assigned to:
Priority: minor Milestone: 1.0.0
Component: Version:
Keywords: Cc:
Qualification:

Description

According to a forum discussion started by flod (http://www.symfony-project.com/forum/index.php/t/1571/), the current sfFillInFormFilter is not generating XHTML complaint output. sfFillInFormFilter uses saveHTML() function which doesn't output XHTML. Changing it to saveXML() will generate XHTML complaint output with a side-effect of an XML declaration (<?xml version="1.0" encoding="utf-8" standalone="yes"?>) inserted to the top of the page, but it is valid in a XHTML document, or can be easily stripped away otherwise.

Change History

05/06/06 19:18:35 changed by anonymous

  • priority changed from critical to minor.

05/07/06 18:11:12 changed by tamcy

Oh, there is feedback that using saveXML() will mess up the CDATA area, so this may not be a good solution...

05/09/06 17:04:52 changed by fabien

  • milestone set to 1.0.0.

05/15/06 01:30:14 changed by pookey@pookey.co.uk

Using saveXML will alter the way CDATA is handled, developers can work around that.

the problem with using saveXML() is that your HTML *must* be XML complient, else parsing the document will fail. The fillin filter could try saveXML firts, then fallback to saveHTML I guess... that might be the best solution. Personally I think the priority should be increased on this from 'minor'. Invalid pages change the rendering mode of web browsers from strick to quirks mode doesn't it?

05/15/06 22:08:46 changed by hansbrix

your html should be xml-compliant anyway. but your suggestion of falling back to savehtml is good i spose. yeah, i'm all about proper xhtml output on every page..

05/17/06 13:12:25 changed by pookey@pookey.co.uk

the framework should be able to handle someone using a <br> or a <img ..> though, if it were to die and be unusable because someone did that, IMO that would be bad. I personally agree that pages should be XHTML complient, but the framework shouldn't take that choice away from the developer.

06/16/06 09:46:47 changed by fabien

  • milestone changed from 0.6.4 to 1.0.0.

12/16/06 17:24:55 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

You can now choose which method symfony use. You can pass a "content_type" parameter to the fill in filter configuration. It can takes "html" or "xml".

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting.
Sensio Labs also supports several large Open-Source projects.