tag:help-archives.hannonhill.com,2010-02-09:/discussions/general/394-html-5-charsetCascade CMS: Discussion 2013-08-20T03:55:32Ztag:help-archives.hannonhill.com,2010-02-09:Comment/110328872011-11-01T22:03:34Z2011-11-01T22:03:47ZHTML 5 charset<div><p>What exactly do you mean by "Cascade doesn't like it?" Are you
receiving an error or simply that your Template code is being
jumbled?</p>
<p>I apologize if this seems basic and I don't mean it in any way,
but have you tried your code as a self-closing tag (like the
working meta you posted)? That particular tag requires a slash at
the end of it and Cascade also requires valid XML markup in the
Templates.</p>
<p>Does this achieve a desired output?<br>
<code><meta charset="utf-8"/></code></p></div>Charlie Holdertag:help-archives.hannonhill.com,2010-02-09:Comment/110328872011-11-22T16:21:34Z2011-11-22T16:21:34ZHTML 5 charset<div><p>That does work in Cascade but it seems to have varying results
in browsers using the charset reference closed that way (could be
related to something other than the charset but that is what I am
thinking now). I tried putting an unclosed charset wrapped in a
system-view:external tag but Cascade still rewrote it as a closed
tag. Trying to use an open charset inside of Cascade removed all
HTML 5 tags (article, section, etc.). So I am wondering if there is
a work-around I haven't thought of for getting the unclosed tag as
the output but leaving it closed in Cascade? If not, maybe it is
something you could look at for the next version.</p></div>webteamtag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-01-21T11:06:19Z2012-01-21T11:06:19ZHTML 5 charset<div><p>The varying results in browsers is surely caused by varying
support for HTML5. Closing the charset reference is valid (X)HTML5.
You shouldn't feel compelled to use invalid XML on your pages,
especially since it's required in Cascade. What DOCTYPE are you
using? What MIME or Content-type header value are you serving:
text/html or application/xhtml+xml?</p>
<p>We're using HTML5, and it validates on validator.nu, but it's
going to have to be the XHTML version of HTML5 - I'm not going to
try to fight it.</p>
<p><code><!DOCTYPE html> <html
xmlns="http://www.w3.org/1999/xhtml"> <head> <meta
charset="utf-8"/></code></p></div>Michael McGinnistag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-01-23T15:01:14Z2012-01-23T15:01:14ZHTML 5 charset<div><p>I agree much of how things react in various user agents is
related to the support of HTML5 in each agent. So, my hunt is for
the most reliable set of code and hope the browsers will implement
what the W3C is recommending.<br>
As for the strange results I found in Cascade, I think this was the
result of a few things happening at the same time. I have
successfully placed and published HTML5 tags so that isn't an issue
as I originally thought. What I found is when saving a template, at
times, Cascade will rewrite the code and move the head and body
tags to a new location in the code. At that time it will remove any
HTML5 specific tags. When this first happened I didn't notice that
the head and body tags were moved. All I saw at first glance was
the HTML 5 tags being stripped. At second glance it became apparent
what happened and how the two were related. I have not pinned down
just what causes this code rewrite. One example was the charset tag
mentioned in my original post but there seems to be other times
when this happens. My guess is malformed xml somewhere in the
template. Perhaps valid html when the page is finally published but
not valid in the template itself. Maybe the H-H folks have
something to add?</p></div>webteamtag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-01-23T16:09:36Z2012-01-23T16:09:53ZHTML 5 charset<div><p>Yes, I think it must be malformed xml somewhere in the template.
When I reported a similar problem with <a href=
"http://help.hannonhill.com/discussions/bug-reports/149-silent-template-rewrite-upon-save">
code being moved and rewritten</a>, Joel at H-H referred me to
<a href=
"https://hannonhill.jira.com/browse/CSI-109">https://hannonhill.jira.com/browse/CSI-109</a>.
Adam explains that "Cascade uses a utility called <a href=
"http://help.hannonhill.com/discussions/bug-reports/136-cascade-keeps-moving-my-head-and-body#comment_11605553">
JTidy</a> to fix invalid XHTML." The short explanation is that it's
not enough to have valid HTML5 in the template or even in the
published page. Templates may not contain any malformed XML, even
though the HTML5 spec allows it. You have to use XHTML5.</p></div>Michael McGinnistag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-01-23T16:39:37Z2012-01-23T16:39:37ZHTML 5 charset<div><p>The only problem I have with the explanation of malformed xml is
that the system should report it as such on save, thus letting you
know you need to fix something before rewriting your code. This
does happen at times so it makes me wonder if this isn't a bug
based on certain specific code situations. Now what are those
situations so we can avoid them, I don't know.</p>
<p>Abotu Tidy, there is no check box for turning Tidy off on
templates. Have I missed this somewhere. I know how to add/remove
the option of using Tidy for pages in the system but not for
templates. The option of not using Tidy on templates would be good
if it is in fact applied behind the scenes to them.</p>
<p>Here is what I am using currently and it seems to be safe:<br>
<code><!DOCTYPE html></code></p>
<p><code><html lang="en"></code></p>
<p><code><head></code></p>
<p><code><meta charset="utf-8"/></code></p>
<p><code></head></code></p></div>webteamtag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-02-03T21:03:30Z2012-02-03T21:03:30ZHTML 5 charset<div><p>I should emphasize that having my templates rewritten without
notification is disturbing to me as well. I've finally learned to
keep a copy of my original template as a text file, so I can paste
it back, over and over, every time that JTidy silently strips out
ALL the new HTML5 tags. That behavior affects my page structure,
you know, adversely. Eventually I figure out what part of my code
isn't valid XML. Recently I found another useful technique: save my
template as an XML file and run it through a validator. That way, I
can find the errors that JTidy is finding but isn't telling me
about. (PS. This thread is attracting spammers.)</p></div>Michael McGinnistag:help-archives.hannonhill.com,2010-02-09:Comment/110328872012-03-19T20:04:54Z2012-03-19T20:04:54ZHTML 5 charset<div><p>Trying to follow up with some of the posts.</p>
<p>Sounds like you've been able to get it working. I can comment on
a few of the things mentioned here:</p>
<p>Currently we aren't allowing to turn off JTidy for submitting
Templates. Correct Michael -- We only use JTidy in the Template on
invalid XHTML because we can't store an invalid template.</p>
<p>If you're experiencing more issues trying to get these tags
working, please let me know. You can certainly open this thread
again or start a new one.</p></div>Charlie Holder