My biggest pet peeve on running this blog

I have to fix this several times a week…please read and heed. I’m hoping that if I announce this as a post, it will reduce the problem.

No wordpress.com can’t fix this issue with comments, I’ve asked.

PLEASE be careful when trying to bold, italicize, link, or blockquote in comments. Just one transposed character is all it takes. Also, there’s no need to try to hyperlink URL’s, WordPress will automatically hyperlink any URL you type in like this:

http://www.wattsupwiththat.com

OK, please note this, then burn it into your mind, slash BEFORE, not after. Thanks for your consideration – Anthony

Advertisements

  Subscribe  
newest oldest most voted
Notify of
Bryn Thomas

Just checking

GeorgeG

I understand.
You might consider if there is some code that can be automatically inserted at the end of every post that will turn off any such markup that the post has left on.
REPLY: And that is what I asked wordpress.com for…no can do -A

gingoro

Why not expand the HTML tags and attributes to show exactly how to make use of them. Use simple examples.

>>i>I’ve never had that problem. Myself, I’m not that familiar with html.
[Reply: I can tell. You did the backward “hosed” tag that Anthony wrote about, and every post after yours was in italics. Fixed now. ~dbs, mod.]

TerryMN

I was going to suggest a scratch-pad permanent thread, but then found that you have one on the menu bar, labelled “Test” – good to see (if maybe a bit obscurely titled), and I think it may be useful to note the link/thread/purpose in the heading of the post. If you can set it to auto-purge at 10 or 15 posts, it would make for a good scratch-pad/preview area for those wanting to test out their tags/posts. It won’t eliminate typos, but we don’t live in a perfect world. Good luck! 🙂

I am an old fashion kinda a guy–*stuf* or _empfassis_ is good enough for me. If you can’t do it with a 4-row teletype, it doesn’t need to be did.
What if everybody _started_ their comments with **?

A lot of people don’t know this, but the REAL culprit behind broken html codes? Yup. Global warming.

ShrNfr

@Larry Sheldon: We would be baudoted to death?

Tony

Someone left the tag open. I’m putting in a closing tag here:
I think that should work for everything after this…

REPLY:
Sadly, no, and that’s the maddening part about it. – A

R.S.Brown

Anthony,
Many thanks for the illustration on the error of my HTML ways
on screwing up the “slash” in front of the “i” when trying to italicize.
I’m still adjusting to my new trifocals.
Don’t I recall you saying some time ago that wordpress.com isn’t
able to provide a segregated sandbox for HTML test runs on our
comments before we enter them onto the thread ?
My old Word editor won’t let me run HTML tests at home.
[Reply: use the “Test” page in the masthead menu. ~dbs]

TonyG

Hmm. Guess not. a few more?

Mike Jowsey

Slash-eye

I sympathize completely, Anthony.

North of 43 and south of 44

Yup global warming.

okie333
Leon Brozyna

Not only every following comment, but also all the text in the sidebar.
[You da man!☺ ~dbs]

North of 43 and south of 44

Now about what the fine WordPress peeps told you.
It is baloney.
The generated code from a posting operation is under complete control of the WordPress system they can block any attribute from being open at a post boundary.
True it will slow things down but it is doable.

TerryS

The only problem with publicising something like this is that there are people out there who will now do this sort of thing just to cause mischief.

e. cowan

This is really a bug with WordPress. They should automatically self-contain each comment and run a filter to weed out errant html for allowed tags. I realize this is nothing AW can fix, it’s something WP needs to fix.

CRS, Dr.P.H.

WE HEAR AND OBEY!!
…I feel like a kid that just got spanked by Dad! Forgive us our sins, Anthony!

Rattus Norvegicus

WordPress could fix this iff they ran stuff through HTMLtidy before sending it to the database. I used it to fix some tragically screwed up HTML entered idiots who were incorrectly trained in how to enter HTML in our database and who insisted, even after I corrected the training advice, in entering tragically bad HTML. Tell the geeks at WordPress that HTMLtidy can fix lots of egregious problems in user entered HTML. There is no excuse.

If it’s such a common error, it really shouldn’t be so hard for WP to run a regular expression hunt/fix for the incorrect tag, replacing it with the correct tag.
I’ve moved to using BBCode rather than HTML tags for user interaction in my own website development projects, specifically to circumvent this kind of issue. It’s the best way by far to prevent code injection etc.

John Whitman

My experience is that even knowing how to properly use HTML tags and being a veteran at it does not prevent a simple mistake in the heat of commenting.
When drafting a comment I find that using a full capability word processing program with spell checking at least brings attention to the HTML tags as being a misspelled word. So you can at least look to see if it is correctly constructed. When everything is OK in the word processor then cut and paste to the WUWT comment box.
John

Doug Deal

I am a web application developer by trade, although a Chemical Engineer by education.
Anyway, if you want to test any html code with tools that you very likely already have, you can simply put it into a text document, save it and open it with the browser. In I.E. it is control-O or under the file menu. Instead of entering a URL, click browse and find your file.
Alternatively, on a PC, you can right click and “open with” your browser.

may help

How about adding “</i>” and “</b>” to the end of every post by adding it to the template code? Looking at the code, a posting on this page is always enclosed in <div class=”comment-body”> and </div>. Adding </i></b> before the </div> in the template will stop the error from mangling all other posts and unnecessary closing tags are ignored by the browser.

Earlier ( at http://wattsupwiththat.com/2011/03/19/my-biggest-pet-peeve-on-running-this-blog/#comment-624642 ) I tried to suggest a set of closers at the start of every comment–they of course disappeared, but a later demonstration showed it wouldn’t work anyway.
In that same comment I suggest that we don’t really need the HTML: for ShrNfr, think of the energy we’d save–ASCII is a 7-bit code in an 8-bit envelope, baudot is a 5-bit code in a (depending on how you count it) 5-, 6-, or 7-bit envelope.

Bob Diaz

I will be more careful about that.
Test Bold Normal
Bob Diaz

R. Craigen

Cool. I gotta try the backwards tag. (just kidding!)
Why not include the capability for users to edit their own comments — like many blog sites do? This would not completely eliminate the problem as many people wouldn’t realise their comments were problematic, but it would probably dramatically reduce the number of interventions needed by admins.
Also, Anthony, you’re taking on too much yourself. This blog has so much traffic you really should have sufficiently many volunteer admins that you rarely have to touch the site at that level. I’m for having that sort of task delegated to a couple of your most trusted helpers who have a flair for it.

ikes

Probably should just fix the software. There’s no excuse for the software being so bad that a formatting error in a comment breaks a page.

Latitude

Anthony, since this bugs you, is there a way to just turn off all tags?
They aren’t really necessary.
.. and like John said, it’s like misspelling a word, even experts can mess up..
I don’t use them, ever, I know I would mess one up and know it would bug you. But if I did, I would do like John says and copy into word first…………
REPLY: I wish there was. Copying into Word only makes the problem worse as word is a terrible HTML editor that adds lots of extra junk -A

DanD

If you have a site admin, or have a trusted person who has at least dabbled in php, here’s what you need to do:
tell them to find the region in the commenting script that parses the database record row by row. There should be a specific line that handles the body of the comment. From there, all you have to do is something like the following:

if(stripos($database_row['comment'], '' && !stripos($database_row['comment'], '')){
$database_row['comment'] .= '';
}

where “$database_row[‘comment’]” represents the content of a database result’s comment field. This scriptlet will determine whether or not a comment has the tag without its closing tag.
You can email me at dcdorset ~@~ gmail DOT com if you need more help. I really enjoy your site, keep up the good work!

DanD

Argh, it still stripped out my italics tags. Email me if you think i can help.

King of Cool

May I also suggest that you make your guide a little more explicit under where you enter your post as every-one may not know what all your HTML tags mean and how to use them:
Something like:
http://www.ibdguy.com/
for the tags you allow.
Or by adding a ‘Complete Idiots’ type guide to the RHS side of the page where you have other references.
E.G
http://dynamicdesignz.net/guides/Tags/index.htm

mct

Surely this is a problem with the theme?
If you placed a permanent closing tag for italic and bold after the end of each post (after the closing LI tag) the problem would disappear….
Yes, it would be slightly poor HTML, but so what?

Me

A Tech resolution will beat out an appeal to ignorance resolution every time. You will be frustrated forever until you outsmart the problem.

There are several WP plug ins that provide WYSIWYG editing or preview capabilities.
With the current setup, commentors must post blindly; they can’t verify that they’ve done the tagging correctly.

Ben U.

High up in the sidebar I’d put:
Close tags correctly. Right: </b> Wrong: <b/> Right: </i> Wrong: <i/>
I wish I were acquainted with WordPress. I have trouble believing that you couldn’t manually put extra closing tags into the template. I just checked and found places where it would work in Google Blogger templates, both the “classic” template and the recent one. Seems simple. (Of course, Blogger interrupts the posting of a comment with an unclosed (or badly closed) tag anyway, so I can’t test the effectiveness of adding of extra closing tags into the template.) (I’m not saying you should switch to Blogger, I know that WordPress has advantages.)

As to bold and italics, yes yes. Another squirrel in WordPress’ HTMLow tree is its treatment of links: the URL must be between double-quotes. In normal HTML, the quotation is optional unless the URL contains special characters.
The following example may become garbled; I’m assuming that WordPress treates the “code” tag correctly.
This works:
WattsUp won the prize.
resulting in:
WattsUp won the prize.
This doesn’t:
WattsUp won the prize.
resulting in:
WattsUp won the prize.
Every blog software package I’ve come across has strange bugs in its HTML parser; Wp is not alone in this.

Pompous Git

North of 43 and south of 44 said @ March 19, 2011 at 5:01 pm
“Yup global warming.”
Nope. HTML’s screwed @43degrees south and we ain’t got no global warming! If you have any spare you can send down here, it would be very much appreciated 😉

Nope, Wp doesn’t handle the “code” tag correctly… A “Preview” option would be helpful..

Philip Mulholland

I use Firefox with the Climate Audit CA Assistant script enabled.
Seems to work ok on this blog
(Except for embedding images which fails)
Firefox enabled CA Assistant also has a Preview button

David Falkner

Would it still happen if you went back to nested comments?

Darren Parker

Why not just let the trolls know how to bring down your blog while you’re at it!
[Reply: it’s easy enough to fix, and if someone does it more than a couple of times, they might end up in the spam bucket permanently. ~dbs, mod.]

Brian

When we talk about HTML, I strongly recommend http://www.w3schools.com, which contains tutorials, references and examples of basic HTML
http://www.w3schools.com/html/default.asp

Nullius in Verba

The problem is due to lazy coding on the part of WP, and a somewhat complicated muddle of syntax between different markup languages.
WP do in fact filter comments for unbalanced tags and other problems. That’s why attempts to fix it by other posters putting in closing tags don’t work. The filters spot these as unbalanced tags and delete them.
I think the bug is in a function called force_balance_tags. First they find a tag. If it starts with a / they assume it’s a close tag. If it doesn’t, it’s an open tag, but if an open tag ends with a /, they immediately (and incorrectly) assume that it is an XHTML self-closing tag and ignore it. They don’t check to make sure it is one of the valid self-closing tags. This means that the i/ combination gets treated as a self-closing tag and is left in. The original i-tag is closed off, but the second i/-tag is not.
Since the browser thinks it’s reading HTML, and self-closing tags are not valid in that language, the closing / gets ignored and it acts just like a normal i-tag and turns everything to italics.
I am sure it is fixable, but could be tricky to do without breaking something else, and high-level computer geeks of the sort who dream in regular expressions put a low priority on proofing things against idiots who can’t even manage to code basic html properly. They’re like that.
As I’m not such an expert, I could be completely wrong – but that’s what it looks like to me.

Predicador

Anthony,
we know your reasons for sticking with wordpress.com as you have explained them several times, and they make sense, especially on a short time horizon. However, it is also pretty much obvious WUWT is here to stay, and hence must consider three-five-more years perspective. WordPress, either in its hosted or standalone incarnation, won’t take you much further. Among the audience of WUWT, there are hundreds of people with experience of coding for other platforms who would be only happy to contribute.
At risk of starting ‘WordPress vs others’ flame war, this is still something to consider.

rberteig

It would require a sea change, but the folks over at Stack Overflow (http://www.stackoverflow.com/) and friends have been using Markdown (http://daringfireball.net/projects/markdown/) rather than HTML for text formatting with great success. It started out as a programming site, but has grown a bunch of companion sites covering a wide array of technical (and even non-technical) topics, and the learning curve for the typical user seems pretty short and easy. I would wonder if WP could do that too. Markdown uses plain ascii text in ways that are familiar to typewriter (and teletype) users.

juanslayton

Being irremediably absent minded, I am one of the guilty. But I found a simple solution:
Type the close tag first!

Tom T

That’s why I don’t mess around with those things. I know its just asking for trouble.