Single quote in map description bug

If you find a bug please report it here

Single quote in map description bug

Postby CunningChuck » Sun Mar 11, 2012 12:33 am

Hi,
I created a map, then try to play it. I wasn't able to clik on it. So I try to submit it. Still can't play it.
Then I realised the map description have a single quote.
Here is your code when you click on a map:
onclick="selectmap(603, 'Strategoreal', 2),viewMap('603#2#Real Stratego.But can't place towe#CunningChuck#Strategoreal#submit');"

name of the map: Strategoreal
You need to escape the single quote in the name and description with a backslash.

Awesome game!
Thanks
Chuck
CunningChuck
 
Posts: 7
Joined: Sat Mar 03, 2012 6:19 am

Re: Single quote in map description bug

Postby SnotlinG » Mon Mar 12, 2012 2:39 pm

Hello,

Yes I have actually added some functions a while ago to clean out all special characters like ' ´ etc, but seems it is not working 100%. Do you know how you managed to add the ' in your mapdescription?
Did you add your mapdescription at the same time as creating the map (i.e. for first save) or was it added later on?

I have cleaned your description manually for now, so it should work properly now.

Thanks for reporting!
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am

Re: Single quote in map description bug

Postby CunningChuck » Wed Mar 14, 2012 5:16 pm

Hi, thx for cleaning the description.
I added the description at the 2 places you mentionned.First in description, before the first save. That description is caped in length, so it told me how many character I may use.
Sencondly, I saved the map the first time, and needed to enter a description again. That description wasn't caped, so I added a long description.
Result: the "first save" description was the one assigned to the map. As my text wasn't caped but the lengh fill still have a maximum, it got truncated. So the problem is in the "first save" code.

1. May you correct the single quote escaping in the first save.
2. May you add a text cap, so text don't get truncated without the map creator knowing it in the "first save".
3. If someone edit the map name and description before the "first save", may you use that configuration.

Thank you a lot for the game! It is awesome!
Chuck
CunningChuck
 
Posts: 7
Joined: Sat Mar 03, 2012 6:19 am

Re: Single quote in map description bug

Postby SnotlinG » Wed Mar 14, 2012 8:27 pm

Ill have a look and see if I can fix those small annoying things for next version :-)
SnotlinG
 
Posts: 2148
Joined: Sat Feb 13, 2010 12:42 am


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 16 guests

cron
Not able to open ./cache/data_global.php