Test Away!

| | 17 Comments

I’ve created a new client-side script to go along with the next version of Xomment that will verify and correct comments, before they are submitted. I don’t have time to describe how it works right now, but try previewing or submitting a comment on this entry to see it in action.

Try this bad comment for starters:


<blockquote>
<b><i>I am a quote</i></b>
</blockquote>

1<br>
2<br>
3

<blockquote>
<b><i>I am a quote</b></i>
<blockquote>

Send me any complements or issues that you find. Note, comment validation is tied to your browser, so depending on what you use, you many get different results.

17 Comments

I am a quote

1
2
3

I am a quote

Reed, it did not work for me. I have copied your bad “comment”, corrected the erors, and clicked “submit.” Thetext imediately reversed on my screen to the original text with errors. I tried it three times, each time correcting the errors, but repeatedly it just reversed back to the original text with errors. I am using MS Explorer.

I’m not sure what you did, but the errors are automatically corrected by the script. The only thing you’d need to do is change any of the corrections that aren’t what you’re looking for.

Anyway, what version of explorer are you using? Have you tried clearing your cache? The new ability is in an updated script, and you won’t see it if your cache is out of date.

I’m testing something.

I like it. It gives some kind of feedback about the syntax parser failures. I am very familiar with html syntax (I write c++ code for a living) so I can use it very effectively. People who get confused by the syntax might get the hang of it by the annotated feedback.

We have come a long way since my first brush with computers, IBM 370/155 printing out, Expecting operator but end of statement found.

Ravilyn - One of the classic error codes in the first IBM PC’s DOS was “Keyboard not found - hit F1 to continue.”

Reed said “I’m testing something,” and Paul replies this editor majorly barfs - it likes run-on sentences but hates paragraphs…?

And a long way from GO TO 100 followed by 100 FORMAT(I5) to give an illegal instruction “check stop” on an IBM 1620 in 1962. When the professor’s standard “solve a quadratic equation program” did this the second year he used it, he called the IBM service repairman. He did not suspect that students had used their master key to alter his program by adding one digit to the end of the GO TO statement. Of course we changed it back the next night.

If I do “strong” followed by another “strong”, then the automatic correction is to add two “/strong”’s at the end of the entire comment. This is valid syntax, but it’s not intelligent.

Mike McCants said:

If I do “strong” followed by another “strong”, then the automatic correction is to add two “/strong”’s at the end of the entire comment. This is valid syntax, but it’s not intelligent.

The algorithm leverages your browser’s built in parsing/correction algorithm. It looks like most of these parsers don’t try to guess that a start tag should have been an end tag. Instead they just close both tags at the last possible location. I’ve written a few regular expressions that will remove several of the simpler cases of uneducated replacements.

No algorithm is likely going to be able to guess at what the user intended to write, when they wrote something different. That is why I require the user to review the suggested changes and provide a diff to help them.

How about other tags like UL (unordered list, very useful on a discussion board) and LI (list item for the same list) Even so, it is a good start.

I seem to be having trouble when using punctuation.

Steven Laskoske said:

How about other tags like UL (unordered list, very useful on a discussion board) and LI (list item for the same list) Even so, it is a good start.

The validator will support any tags, even gibberish ones. However, the quality of the correction is browser specific.

Steven Laskoske said:

I seem to be having trouble when using punctuation.

Can you give an example?

Mark Perakh said:

Reed, it did not work for me. I have copied your bad “comment”, corrected the erors, and clicked “submit.” Thetext imediately reversed on my screen to the original text with errors. I tried it three times, each time correcting the errors, but repeatedly it just reversed back to the original text with errors. I am using MS Explorer.

Anothr test

Panda’s Thumb comments are broken, broken, broken? With Netscape 9, when I select comment panel 2 or 3 or 7, the displayed comments do not change.

However, this seems to work with IE 6 and Firefox 3.

The “(new)” option is not present on the main page as shown by IE 6, Firefox 3, and Netscape 9.

It was working ok the day before yesterday.

I’m upgrading PT to match this blog. You probably need to clear your cache to get the new helper files for PT.

About this Entry

This page contains a single entry by Reed A. Cartwright published on August 23, 2008 2:08 AM.

Lego Computer was the previous entry in this blog.

Beijing, Minnesota is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

Powered by Movable Type 4.37