Project

General

Profile

Actions

Bug #1415

closed

WApplication::setInternalPath(...) and apostrophe

Added by Anonymous over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
09/01/2012
Due date:
% Done:

0%

Estimated time:

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

Actions #1

Updated by siof siof over 11 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

Actions #2

Updated by Koen Deforche over 11 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

Actions #3

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed

Fixed in Wt 3.2.3 RC1.

Actions

Also available in: Atom PDF