Earth Home Links Archives Photos About Home

wget considered harmful

Posted on Friday September 18, 2009 at 3:25 pm. Tags: , ,

Considered harmful to Wordpress, anyway.

I was trying to type my previous entry, about getting Fotobook working, especially the second bit about getting the update script running automatically through my crontab. The problem was… I couldn’t type wget!

It’s kind of an important part of the crontab line; that’s the command that has Unix load the given page. But for some reason, every time the word wget was in the post, I got an error when I tried to publish my edits. I’m guessing that Wordpress tries to execute wget when it finds it (for reasons unknown; a bug?). So I spent longer than I care to recount trying to figure out how to disguise wget in my code, but have it appear normally on the entry so it could be copy-pasted into Terminal.

The first solution I looked for was an HTML tag like to make it not interpreted, and just presented literally. Didn’t work. And my search for a better tag was fruitless, though CDATA looked good for a while. (Guess it doesn’t interpret in XML.)

Then I tried inserting things inside wget. Putting a “|” in the middle obviously worked, but it’s ugly, and I’d have to explain it. So I looked for some latin-1 character that would be invisible.  was close, but for some reason, when it copy-pasted into Terminal, it eliminated the “g“. A 0×0 .gif image would’ve worked, but my stylesheet gives every image padding plus a border, so it looked like a white box in the middle.

Then the lightbulb— any HTML tag that wouldn’t get rendered into something visible would work. I tried <>. That showed up as <> (weird). </> was invisible, but when I went back to edit, WP had gotten rid of it as obviously useless. So then I just used bold tags.

wg<b></b>et worked. Hurrah.

Kludgy, but it works. If you have a better, more elegant solution, I would love to hear it.

No comments for wget considered harmful »

No comments yet.

Leave a comment

(required)

(not published)

RSS feed for comments on this post.