How do I remove curly quotes from code examples?
-
If I want to have an example of code on my blog that people can copy, how do I do this? It keeps changing normal quotes to curly quotes, and then the code no longer works when people paste it into their pages. On these forums I can do this:
<a href="http://www.something.fi">this link</a>to keep things as they are, but it doesn’t work on a blog. Any ideas?
-
It took me a few minutes to figure out, but you can use the HTML character for < and >instead of the character itself. the html to use is
& lt;. For example:‘& lt;a href=”http://test.com”& gt;test url& lt;/a& gt;’
It looks a bit messy, but should work. I hope this displays properly!
HTH
Collin
Edit: It didn’t. You’ll need to take the spaces out of the html codes for them to work.
-
Change the leading ‘<‘ marks to
<That way WordPress won’t pick them up as code. I don’t think you need to do the trailing ones though unless you wan to just to keep in the habit. -
-
Isn’t that generally exactly what I said?
Ok, so you said it in fewer words (and code…) ;)
-
*lol* how many times and in how many ways … *lol* here comes the mini full of clowns http://wordpress.com/forums/topic.php?id=932&replies=7
-
Cornell, yes but when you had it up there beforehand, it didn’t show correctly either. :)
-
- The topic ‘How do I remove curly quotes from code examples?’ is closed to new replies.