- changed status to resolved
HTML filter insert non-empty <meta> in some cases
Original [issue 212](https://code.google.com/p/okapi/issues/detail?id=212) created by @ysavourel on 2012-02-17T12:04:57.000Z:
The HTML filter inserts non-empty <meta> elements for declaring the encoding when it's absent. This is not compatible with XHTML. It should insert an empty element <meta /> or none at all.
Comments (6)
-
Account Deleted -
Account Deleted - changed status to open
Comment [2.](https://code.google.com/p/okapi/issues/detail?id=212#c2) originally posted by @ysavourel on 2012-02-17T16:03:59.000Z:
<meta/> should always be legal - even in normal broken html - from examples I have seen at least.
The problem is not the broken HTML, it’s the valid HTMLs: I’ve check a sample file in the W3C validator:
Using <meta /> in HTML is an error:
And the description is: “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.”
We don’t want to break valid files.
This assuming xhtml will always have a proper xml encoding declaration.
It can be a default declaration (UTF-8). So I don't think all XHTML will have a declaration. But all XHTML should have a namespace declaration. That could be our clue.
As far as custom formats would an option be better as we don't know for each custom format what the right thing to do is?
+1, By default we should do nothing. Like in the case of MapCap the custom XML format has probably a normal XML declaration.
-
Account Deleted Comment [3.](https://code.google.com/p/okapi/issues/detail?id=212#c3) originally posted by @ysavourel on 2012-02-17T16:04:15.000Z:
-
Account Deleted Comment [4.](https://code.google.com/p/okapi/issues/detail?id=212#c4) originally posted by @amake on 2012-02-20T03:23:45.000Z:
<meta/> \*does\* appear to work for MadCap files, though it doesn't seem to be an ideal solution.
-
Account Deleted Comment [5.](https://code.google.com/p/okapi/issues/detail?id=212#c5) originally posted by @ysavourel on 2012-02-20T18:00:36.000Z:
I've implemented the 3-cases solution. But it's not implemented as an option. Should be in the next snapshot later today.
-
Account Deleted - changed status to resolved
Comment [6.](https://code.google.com/p/okapi/issues/detail?id=212#c6) originally posted by @ysavourel on 2012-03-01T22:55:42.000Z:
That's fixed. In M16.
- Log in to comment
Comment [1.](https://code.google.com/p/okapi/issues/detail?id=212#c1) originally posted by @ysavourel on 2012-02-17T12:35:19.000Z:
added "/" to end of meata tag