' gets replaced by "
-
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 " and < by <.
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] formatThe 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 "’ is closed to new replies.