Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Configuring Input Options

I would like to disable HTML but still allow Markdown.

Disabling HtmLawed prevents all HTML, including HTML generated by Markdown.

If there is documentation for this, my apologies. Please be so kind as to point me to the right page to read.

Best Answer

  • hgtonighthgtonight MVP
    Answer ✓

    Markdown allows inline HTML. This is part of the Markdown specification.

    You could still strip out all the tags, but then you aren't really parsing Markdown properly.

    Sounds like a custom plugin is in order.

    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.

Answers

  • edited July 2014

    Have you tried adding this Configuration to the config.php?

    $Configuration['Garden']['InputFormatter']='Markdown';

    or

    $Configuration['Garden']['ForceInputFormatter']='Markdown';

  • @vrijvlinder said:
    Have you tried adding this Configuration to the config.php?

    $Configuration['Garden']['InputFormatter']='Markdown';

    Yes, I have the following:

    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';

    $Configuration['Garden']['InputFormatter'] = 'Markdown';

    This still allows user-entered HTML.

  • What Vanilla version and what text editor are you using ?

  • Vanilla version is 2.2.15 and whatever comes out of the box. I don't have anything installed for editing.

  • hgtonighthgtonight MVP
    Answer ✓

    Markdown allows inline HTML. This is part of the Markdown specification.

    You could still strip out all the tags, but then you aren't really parsing Markdown properly.

    Sounds like a custom plugin is in order.

    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.

  • The current Stable version is 2.1 please use that one or file the bugs for the 2.2 at Github.
    I don't use that version and can't test for you what could be wrong. :(

  • @vrijvlinder - Good point. I'll stick to 2.1

    @hgtonight - Sigh, I think you're right.

  • cool! here is an icon for your plugin :D

    I will not be able to do these for a while so ..... if you want something else let me know real soon...

  • Awww, that's awesome! Thanks so much!

  • Markdown specification allows html. A more accurate name would be Markdown without html.

    Markdown was always complementary of html:

    Markdown is not a replacement for HTML, or even close to it. Its syntax is very small, corresponding only to a very small subset of HTML tags. The idea is not to create a syntax that makes it easier to insert HTML tags. In my opinion, HTML tags are already easy to insert. The idea for Markdown is to make it easy to read, write, and edit prose. HTML is a publishing format; Markdown is a writing format. Thus, Markdown’s formatting syntax only addresses issues that can be conveyed in plain text.

    For any markup that is not covered by Markdown’s syntax, you simply use HTML itself. There’s no need to preface it or delimit it to indicate that you’re switching from Markdown to HTML; you just use the tags.

    The only restrictions are that block-level HTML elements — e.g. <div>, <table>, <pre>, <p>, etc. — must be separated from surrounding content by blank lines, and the start and end tags of the block should not be indented with tabs or spaces. Markdown is smart enough not to add extra (unwanted) <p> tags around HTML block-level tags.

    grep is your friend.

Sign In or Register to comment.