WordPress.org

Support

Support » Plugins and Hacks » WP-Markdown » [Resolved] Angle brackets replaced to HTML entities

[Resolved] Angle brackets replaced to HTML entities

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Stephen Harris

    @stephenharris

    Hi Gauiis,

    If you want to the angular brackets rather than HTML entities you need to use them in as ‘inline code’ or ‘block code’. The first means encasing then in backtics:

    ( seems I can’t demonstrate that here. Try: http://daringfireball.net/projects/markdown/syntax#code )

    To display block code, ensure there is a blank line between the code and the text and indent the code by at least 5 spaces.

    Plugin Author Stephen Harris

    @stephenharris

    On second thoughts – even typing an angular bracket < without bactiks should display the angular bracket and not the HTML entity.

    If you’re seeing the HTML entity code < then output is being is escaped somewhere. But this isn’t a bug with the plug-in.

    Hello again. Thanks for your answer. Indenting the code 5 spaces does nothing. When I edit the post again, the code displays in one line all messed up.

    I’m using Crayon Syntax Highlighter to highlight code on my page. It supports “pre tags” to highlight code. When I use
    “pre” around my code, submit and edit again, WP-Markdown displays the HTML entities (& lt; and & gt).

    This is not a normal behavior – so it must be a bug.

    Plugin Author Stephen Harris

    @stephenharris

    In that case it sounds like a plug-in conflict… I’ve tested it with Crayon and I can replicate this but only when indenting code by 5/more spaces and *not* wrapping it in pre tags. If not indented or wrapped in pre tags the code displays without problem. (I was able to resolve this by checking “Decode HTML entities in code” in the settings).

    But that’s not what you’re saying you’re doing… so in your case I’m not sure. But I didn’t build WP-Markdown with compatibility with Crayon in mind, so there could be a conflict due to the way WP-Markdown handles things (other Markdown plug-ins handle it differently so you might have better luck there).

    WP-Markdown functions correctly on its own, so as far as I can tell its a compatibility issue. Understandable as both plug-ins deal with formatting code.

    But this shouldn’t be a problem, because Crayon doesn’t render the post admin-side, only viewer-side, but the problem is in rendering admin-side.

    So when I submit a post and then edit it again, all the < > are HTML entities. So the problem is not plugin conflict, the problem is in WP-Markdown.

    Plugin Author Stephen Harris

    @stephenharris

    Can’t reproduce this. Have you tried deactivating other plug-ins?

    Yep, deactivated all plugins. Still the same.

    I’m not experiencing this if I copy paste my code from Notepad++ with double TAB for indents. Then the code stays the same. Weird.

    Oh well, then I’ll use double TAB indents. Although it’s too much. 1 TAB (4 spaces) should be the minimum. Maybe you fix that? 🙂

    Hi,

    the workaround with the TAB indentation doesn’t work for me.

    I think this is something broken with the WP Markdown plugin, as I don’t use any other plugin. Trying to display HTML code as blockquote doesn’t work, i.e. all the HTML markup is escaped

    Ok, an update: when typing the HTML code in (i.e. no copy-paste), indenting it all by hand, things work. Could this be some weird kind of line-ending bug? I am using OS X

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘[Resolved] Angle brackets replaced to HTML entities’ is closed to new replies.
Skip to toolbar