Closed Bug 1305935 Opened 9 years ago Closed 9 years ago

Hyphenation does not work with XHTML 1.1

Categories

(Core :: Layout: Text and Fonts, defect)

49 Branch
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: johann.bellmann, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 Build ID: 20160922113459 Steps to reproduce: I wanted to use automatic hyphenation and I used XHTML 1.1 for the Website http://gripstec.de/ The CSS-Settings are in view-source:http://gripstec.de/common/css/gt_docs.css Actual results: The Hyphenation didn't work anymore.(In Firefox it only works with HTML Versions but not with XHTML.) Expected results: The Hyphenation should also work with XHTML as with MS IE, MS Edge and so on.
Component: Untriaged → XML
Product: Firefox → Core
Component: XML → Layout: Text
What matters here isn't the DTD mentioned in the page's <!DOCTYPE>, but the Content-Type header that is provided by the server. And when I inspect the response to the request for http://gripstec.de/, I see that it has Content-Type:"text/html". See https://wiki.whatwg.org/wiki/HTML_vs._XHTML#MIME_Types, which specifically notes that a document served with MIME-type text/html is an HTML (not XHTML!) document. For your document to be treated as an XHTML doc, it MUST have an XML MIME-type such as application/xml or application/xhtml+xml. Similarly, https://www.w3.org/TR/xhtml-media-types/ notes that "XHTML documents served as 'text/html' will not be processed as XML..." Because of the MIME type, your site is not being processed as XHTML but as HTML, and therefore the xml:lang attribute is ignored; you need to use HTML's lang="de" for the expected hyphenation to occur. Alternatively, reconfigure the server so that it uses the correct XML MIME-type, and then the xml:lang attribute should be respected. So, I don't think this is a bug. The fix for this site is to modify either the content or the server configuration.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.