Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Wed Jun 18, 2008 9:44 pm   

[2.27] & not being escaped properly in XML output
 
Create a new session
Goto settings editor
Create a class called "hello&goodbye" (without the quotes)
Export the window to XML
Create a new session and try to import that XML, it fails saying it expects a ;

The XML output is
Code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
<cmud>
<window name="Test" usesession="false">
  <uid>{0E35B4A1-9E22-49E8-A720-1728DD3AB1B0}</uid>
  <packages>English Keypad|English Directions|Clickable URLs|Test</packages>
  <class name="hello&goodbye"/>
</window>
</cmud>


Note on line 6 the "hello&goodbye"
This should be "hello&amp;goodbye"

If you change it to that then import then the import is fine.
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Wed Jun 18, 2008 10:19 pm   
 
Well that is true because & isn't a valid character for a class name. CMUD does not generally parse strings for XML codes when they are not supposed to contain any. I'll add this to a future to-do list just to clean it up. But if you start using special characters in things like class names, variable names, alias names, etc, then you will probably run into all sorts of weird problems.
Reply with quote
Zhiroc
Adept


Joined: 04 Feb 2005
Posts: 246

PostPosted: Fri Jun 20, 2008 1:53 pm   
 
But if the editor allows you to create settings with invalid names, how is someone to know the name is invalid? I presume it's in the docs somewhere, but still...
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net