Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » xmlns dissapear from HTML header

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1420 Views
  • xmedeko
    Avatar
    Community Member
    94 Posts

    xmlns dissapear from HTML header Link to this post

    Hi,
    I have in the beginning of my template:

    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" >

    but when I do "view source" in my firefox, then i see only

    <html lang="en" >

    I have to put

    <html xmlns="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" lang="en" >

    to the template to see it right in the browser.

  • Sean
    Avatar
    Forum Moderator
    921 Posts

    Re: xmlns dissapear from HTML header Link to this post

    This could be to do with the fact ContentNegotiator is rewriting the XHTML doctype you're using to HTML 4.01. Either do the following:

    To disable content negotiation:

    add ContentNegotiator::disable(); to _config.php

    Or, to amend the problem without disabling the content negotiator, add
    <?xml version="1.0" encoding="UTF-8"?> before the doctype.

    Cheers,
    Sean

    1420 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.