Klovera.comBlog
Follow Us:

curl & wget in WordPress posts

Dustin  |  Wordpress  |  October 16th 2008

My last post posed some problems. When attempting to save I received the 403 forbidden error seen here. I found that the reason for this was due to mod_security getting uppity over the word wget in my code examples. You will get the same issue if you ever use the word curl (even in a normal sentence like “curl up”).

If you run into this issue you have 2 choices.

  1. Change mod_security
  2. Use a simple workaround

I opt for #2. Changing mod_security is complex and the inability to use these words is there for a reason. They are commands that can cause some serious havoc to your server if abused. So, instead of gimping your security simply do the following:

use   (non-breaking space HTML element)

To use these words in this post I did the following:

Title: curl & wget in WordPress posts
In a sentence: “…the word wget in my code examples…”

Just make sure you never have the problem word, then a normal space, then any text. It will cause the 403 error.

One Response to “curl & wget in WordPress posts”

  1. Web Based Training says:

    Heh. I can only imagine how long it took to debug that one.
    Doesn’t look like the error message was very helpful.

Leave a Reply

Klovera is a forward thinking, full service digital agency whose purpose is to bring value to our client's businesses through creativity, strategy, metrics, user experience and technology.