Coder Social home page Coder Social logo

Use HTML instead of XHTML about roadie HOT 2 CLOSED

mange avatar mange commented on August 30, 2024
Use HTML instead of XHTML

from roadie.

Comments (2)

vrinek avatar vrinek commented on August 30, 2024

I stumbled upon a few validation issues regarding this one. We send emails as XHTML right now and W3C's validator treats self-closing tags with no trailing slash as errors. I monkey patched Roadie::Document#transform to end with dom.dup.to_xhtml and it solved the issue for me.

XHTML isn't understood by most email clients.

Could you share a link on the resource that claims this?

I assume that since this was merged in 2013, things may have changed.

from roadie.

Mange avatar Mange commented on August 30, 2024

XHTML isn't even understood by most Web browsers. At the height of
adoption, only a few of the major browsers did, and most people publishing
XHTML actually sent them as text/html instead of application/xml, since
small markup errors would just render a XML Parsing error instead of a
mostly working site. For this reason, even the browsers supporting XHTML
treated it as HTML4 with quirks (not to be confused with "quirks mode").

HTML5 began because WhatWG decided that XHTML was dead in the water and not
the way forward. Since HTML5 "won", XHTML is only treated as legacy in most
browsers.

Considering that browsers treat it the way they do, I assume email clients
(who don't implement most of the standards) doesn't support it either. If
you are having problems with HTML5, it's more likely that you should output
HTML4 rather than XML.

I'm open to facts that disprove my stance, however. I have never heard of
an email client supporting XHTML correctly (and of they did, it should be
very likely that they support HTML5 now as "future Web technology" was
important to them), but I know it's all Argument from Ignorance.

ons 20 jan. 2016 13:23 Kostas [email protected] skrev:

I stumbled upon a few validation issues regarding this one. We send emails
as XHTML right now and W3C's validator treats self-closing tags with no
trailing slash as errors. I monkey patched Roadie::Document#transform to
end with dom.dup.to_xhtml and it solved the issue for me.

XHTML isn't understood by most email clients.

Could you share a link on the resource that claims this?

I assume that since this was merged in 2013, things may have changed.


Reply to this email directly or view it on GitHub
#24 (comment).

from roadie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.