'>' is converted to '>' #129

redguardtoo opened this Issue Aug 14, 2013 · 10 comments

7 participants

#+begin_src sh
echo hello > world

is converted to

echo hello &gt; world

in my .emacs:

(setq org2blog/wp-use-sourcecode-shortcode t)

check an example: http://blog.binchen.org/?p=742


@redguardtoo Thanks for the bug reports and your patience with my being relatively inactive on this project. I plan to push a new experimental branch soon, with code that should be relatively cleaner and stable. Would you be willing to beta test that code?


@punchagan , I did some investigation. looks convert > to &gt; is actually correct. The point is which wordpress plugin to install. I tested 3 plugins: Crayon Syntax Highlighter, SyntaxHighlighter Evolved, WP-Syntax.

Seems only SyntaxHighlighter support [sourcecode] tag out of the box.

why you hard code the open/close tag for code segment? most wordpress plugins support <pre>, wordpress itself also support <code> tag.


I am trying the org-8-experimental branch, but it has the same problem with HTML entities inside source blocks being incorrectly encoded. (N.B. Without the fix in #139, org2blog/wp-use-sourcecode-shortcode was being ignored.)


Is there any news on this? In a just published post with snippets of PHP code (I know I shouldn't :), < and > have been transformed into &lt; and &gt;

(well, actually even in the comments of emacs-lisp code, these are being escaped. Similar behaviour as reported in #34 )

@punchagan punchagan closed this in e75afbe May 26, 2014

That's cool! I added your blog to the wiki.


I'm experiencing this issue with the latest version. I paste code containing < and > and when Crayon injects it into my Wordpress post, it converts it to &lt; and &gt;. Any ideas?



I experienced the same issue


Why don't you want html escape the src code?
I just want to html escape the src code, and it seems that org2blog/wp does not html escape the code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment