How to preserve xmlns in the html tag?

Crystal's Avatar

Crystal

25 Feb, 2013 11:24 PM

In the template, I have the code <html lang="en" xmlns:fb="http://ogp.me/ns/fb#">. But when published, the tag is <html lang="en">. How can I keep Cascade from stripping out that specific section of code?

Thanks!

  1. 1 Posted by Ryan Griffith on 26 Feb, 2013 01:45 PM

    Ryan Griffith's Avatar

    Hi Crystal,

    I would like to do some local testing, what version of Cascade are you experiencing this behavior in?

    Thanks!

  2. 2 Posted by Crystal on 26 Feb, 2013 02:09 PM

    Crystal's Avatar

    Thanks for looking into the issue Ryan. We are running Cascade Server v6.8.3.1.

  3. 3 Posted by Ryan Griffith on 27 Feb, 2013 06:02 PM

    Ryan Griffith's Avatar

    Hi Crystal,

    After speaking with the developers, it looks like the any namespace beginning with xmlns: will be removed if there are no elements within the document that use the namespace.

    As a workaround, you could add something like <fb:root/> to your Template or Page HTML and the namespace should be left alone when the Page renders or is published.

    That being said, do you intend to add the namespace, but not add elements that use this namespace?

    Please let me know if you have any questions.

    Thanks!

  4. 4 Posted by Crystal on 27 Feb, 2013 06:19 PM

    Crystal's Avatar

    Correct. Facebook recommends adding that namespace to the HTML tag, but the code we are using for our social media bar doesn't reference that namespace anywhere.

    That said, your suggestion worked! Just added <fb:root/> at the end of our template and the new Facebook Like/Comment button now magically works. Thanks!

  5. 5 Posted by Ryan Griffith on 27 Feb, 2013 08:45 PM

    Ryan Griffith's Avatar

    Thank you for the follow up and additional information, Crystal. Glad to hear adding that empty element did the trick.

    I have logged the removal of the namespace as a known defect since there are circumstances where a namespace may be required, but an element that uses the namespace isn't. Feel free to use this link to track the progress of this issue to see if it has been resolved in a future release of Cascade.

    I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Thanks!

  6. Ryan Griffith closed this discussion on 27 Feb, 2013 08:45 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac