Error in /ASCII/ (8)

1 Name: Anonymous 2005-03-02 21:18 ID:7I9Vh7OT

When trying to view whole topics or looking at archived topics, this happens;

"XML Parsing Error: not well-formed"

Just thought I'd tell ya.

2 Name: Squeeks!!XjdwLWBy (Admin) 2005-03-03 05:20 ID:614rBOqE

Wow, I thought I cleared up all the bugs with XML parsing errors. Hrm. I'll have a look at it; however its more likely that I'm going to have to annoy WAHa about this one.

Thanks Anonymous.

3 Name: !WAHa.06x36 2005-03-03 12:36 ID:O+1J7SI0

You're not allowed to use the character & by itself in XHTML, it has to be written as &. It's converted in the name and comment text when people post, but not in the default username. So:

  • Change the default name to "CTRL-C & CTRL-V"
  • Do a search-and-replace in the old threads and change "CTRL-C & CTRL-V" to "CTRL-C & CTRL-V". Don't change "&" to "&", that would break everything.

4 Name: Squeeks!!XjdwLWBy (Admin) 2005-03-03 13:56 ID:614rBOqE

See I dont like this forced XHTML/XML crap, when something accidently breaks with regular HTML code wise, it may make things look bad, but the page loads. With XML, one fucking error and it wont show anything at all. Its the difference between a cut lip, and a cut throat.

I've changed the default name, but unless some lunix guru is going to tell me howto trawl a folder full of several MiB of HTML documents and clean out every appropriate "&" without spending many hours in front of grep and a text editor, it's gonna wait a while mmmmkay. If you are desperate to see a thread:

5 Name: !WAHa.06x36 2005-03-03 14:10 ID:O+1J7SI0

If you want to disable it, a quick fix is to edit and change if($ENV{HTTP_ACCEPT}=~/application\/xhtml\+xml/) to if(0). I might add an option to turn off XHTML in the next version, too.

6 Name: Anonymous 2005-03-05 02:30 ID:Ts72JXAZ

Mildly tested solution. Um... Don't kill me if it breaks.

Put this in a script called

sed -s 's/ \& / \& /g' $fn >$fn.tmp && mv $fn.tmp $fn

Give execute permission. Then do this:

$ find /path/to/files -iname '*.html' -exec ./ {} \;

You might have to fix the permissions on all your HTML files afterward.

7 Name: Anonymous 2005-03-05 21:32 ID:ZmVz0QhY

Threads in "Film & TV" are affected too, possibly because the board name is included in the page title.

8 Name: Squeeks!!XjdwLWBy (Admin) 2005-03-06 00:43 ID:614rBOqE

Thanks #7, I just did a quick n dirty patchup that >>5 suggested, so it should all be good now.

>>6 : I'm going to test your little script thingy their, and if it works, I'll use it. Thanks!

This thread has been closed. You cannot post in this thread any longer.