Users running a non-download version of Vanilla (pulled from github), on branch release/2019.016 or master from the last 2 weeks should upgrade to release/2019.017 or latest master for security reasons. Downloaded official open sources releases are not affected.

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

FabulousPandaFabulousPanda London New
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

  • hgtonighthgtonight ∞ · New Moderator

    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.

  • hgtonighthgtonight ∞ · New Moderator

    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'

  • hgtonighthgtonight ∞ · New Moderator

    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.

    UnderDog
  • 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

  • hgtonighthgtonight ∞ · New Moderator

    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.

  • ShadowdareShadowdare Moderator
    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

    hgtonight
Sign In or Register to comment.