Need help? Check out our Support site, then

How do I remove curly quotes from code examples?

  1. 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="">this link</a>

    to keep things as they are, but it doesn't work on a blog. Any ideas?

  2. 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=""& gt;test url& lt;/a& gt;'

    It looks a bit messy, but should work. I hope this displays properly!



    Edit: It didn't. You'll need to take the spaces out of the html codes for them to work.

  3. 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.

  4. Ain't this fun? :)

    Change the leading '<' marks to &lt;

  5. Isn't that generally exactly what I said?

    Ok, so you said it in fewer words (and code...) ;)

  6. *lol* how many times and in how many ways ... *lol* here comes the mini full of clowns

  7. Cornell, yes but when you had it up there beforehand, it didn't show correctly either. :)

  8. I thought the question was about curly quotes, not <.

Topic Closed

This topic has been closed to new replies.

About this Topic