' gets replaced by &quot

  • Unknown's avatar

    I’m trying to have my own blog having coding tutorials. For adding code snippets, I’m putting the code in
    [sourcecode]
    …….code here
    [/sourcecode] in the HTML Editor.
    After updating, sometime later I find that all ‘ has been replaced by &quot and < by &lt.
    e.g. I put the following code:-
    [code language='python']
    print('Hello World')
    [/code]

    The page shows the code as:-
    print("Hello World")

    I already tried to enclose within and . But it didn’t look good. I want to keep using the syntax highlighter.i.e.[code]...[/code] format

    The blog I need help with is: (visible only to logged in users)

  • Hi @strategistroy, did you already sort this out? I can see your latest post has properly highlighting and single quotes.

    You will definitely want to use [code language="python"] rather than the sourcecode option you mentioned earlier. You can find other options for that this shortcode here:
    https://en.support.wordpress.com/code/posting-source-code/

  • The topic ‘' gets replaced by &quot’ is closed to new replies.