Small xml parsing bug

Support and feedback for UniAdmin

Small xml parsing bug

Postby swampy » Wed Aug 08, 2007 11:50 pm


Quick fixable issue with uniadmin in the GETADDONLIST operations.

Some sites have a home page with an ampersand in the title. This causes Uniuploader to crash. The bug has already been reported here, but here's the workaround.

Sample file:

TOC Shows:
Code: Select all
## X-Website:

The URL passes the '&' direct into the XML, breaking it and causing the following error:

Code: Select all
UpdateAddons: This is an unexpected token. The expected token is 'SEMICOLON'. Line 1246, position 136.

The '&' should be escaped.

File: modules/interface.php, line 279:
Code: Select all
$addonElement->attribute('homepage', $row['homepage']);

change to:
Code: Select all
$addonElement->attribute('homepage', htmlspecialchars($row['homepage']));

edit: added the url for the existing bug report.
Last edited by swampy on Thu Aug 09, 2007 12:18 am, edited 1 time in total.
User avatar
swampy Apprentice Apprentice
Posts: 43
Joined: Mon Sep 25, 2006 9:38 pm
Location: UK

Small xml parsing bug

Postby zanix » Thu Aug 09, 2007 1:09 am

Read the Forum Rules, the WiKi, and Search before posting!
WoWRoster v2.1 - SigGen v0.3.3.523 - WoWRosterDF
User avatar
Admin Dev Team Dev Team
UA/UU Developer
UA/UU Developer
Posts: 5544
Joined: Mon Jul 03, 2006 8:29 am
Location: Idaho Falls, Idaho
Realm: Doomhammer (PvE) - US

Return to UniAdmin

Who is online

Users browsing this forum: No registered users and 0 guests