HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Replace < br / >< br / > with < br / >< br / > for HTML Validation§

edited February 2014 in Feedback

Hey, I notice there are a lot of line breaks inserted in posts for instance which use
which causes a warning during html validation - could this be switched around please?

Tagged:

Comments

  • ok I can't use HTML it's br in tags which I would like to be br / in tags

  • What validator are you using?

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Actually, what version number of Vanilla are you running?

    What input formatter are you using?

    Plenty of things can insert 'invalid' code, and a quick search of the codebase shows 173 matches for '<br>' mostly in vendor and plugin files.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • W3C - i'm using the up to date non beta branch - the main instance I'm looking for is where it style user's posts, it uses br for new lines 'unclosed'

  • What plugins are you using and what input formatter? (Markdown, Html, BBCode)

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Plugins are All Viewd, Emotify, Flagging, Gravatar, In This Discussion, IndexPhotos, Signatures, Social Login (LoginRadius), split/merge, tagging, Vanilla SEO, Vanilla Statistics and WYSIWGY CLEditor

  • You know, I think I sent you on a wild goose chase.

    nl2br() is a standard PHP library function that is used to replace newlines with html break tags. You will have to go through and pass in TRUE as the second argument everywhere it is used to make it output <br /> instead of <br>.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • edited February 2014

    Is your theme using the <!DOCTYPE html> declaration for HTML5? If so, the W3C validator will check against the HTML5 standards, where <br> is valid according to the W3C Working Draft <http://dev.w3.org/html5/markup/syntax.html#void-element>:

    Start tags consist of the following parts, in exactly the following order:

    >

    1. A "<" character.

    >

    1. The element’s tag name.

    >

    1. Optionally, one or more attributes, each of which must be preceded by one or more space characters.

    >

    1. Optionally, one or more space characters.

    >

    1. Optionally, a "/" character, which may be present only if the element is a void element.

    >

    1. A ">" character.

    Add Pages to Vanilla with the Basic Pages app

Sign In or Register to comment.