Bug #1415
closedWApplication::setInternalPath(...) and apostrophe
0%
Description
Hi,
while i'm trying to set internal path which contains character ' i can see error:
Wt internal error: SyntaxError: missing ) after argument list, code: undefined, description: undefined
this error doesn't appear when i write apostrophe in internal path by hand.
For example:
if i will execute in browser something like that:
http://localhost/?_=/search/npc/a'dal
then everything will be fine
but if i want to set internal path to /search/npc/a'dal from code by something like that:
Wt::WString searchFor = "a'dal";
Wt::WString intPath = "/search/npc";
intPath += "/" + searchFor;
wApp->setInternalPath(intPath.toUTF8(), false);
then i will see that error.
Error occures on latest git (for now it's commit:0df7fd285ee1bebfba0779affb8275e8ddbd2bda )
If you want i can paste url to running app (or to source repo - it's open source on AGPLv3 licence) with this bug.
Kind regards,
siof
Updated by siof siof about 12 years ago
here is a diff file containing little hack fix for that if someone will need this until fixed in more proper way:
http://pastebin.com/M2wtpbVC
it replaces all ' signs with \' to avoid java script syntax error's
Updated by Koen Deforche about 12 years ago
- Status changed from New to Resolved
- Assignee set to Koen Deforche
- Target version set to 3.2.3
Hey,
Thanks for catching this, I've got a fix lined up in my git tree.
Regards,
koen
Updated by Koen Deforche about 12 years ago
- Status changed from Resolved to Closed
Fixed in Wt 3.2.3 RC1.