Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
50705c56
Commit
50705c56
authored
Oct 07, 2009
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 08, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jscript: Fixed escaped characters processing.
parent
38dbc74a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
7 deletions
+17
-7
lex.c
dlls/jscript/lex.c
+9
-7
api.js
dlls/jscript/tests/api.js
+8
-0
No files found.
dlls/jscript/lex.c
View file @
50705c56
...
@@ -287,7 +287,7 @@ static BOOL unescape(WCHAR *str)
...
@@ -287,7 +287,7 @@ static BOOL unescape(WCHAR *str)
i
=
hex_to_int
(
*++
p
);
i
=
hex_to_int
(
*++
p
);
if
(
i
==
-
1
)
if
(
i
==
-
1
)
return
FALSE
;
return
FALSE
;
c
+=
1
<<
4
;
c
+=
i
<<
4
;
i
=
hex_to_int
(
*++
p
);
i
=
hex_to_int
(
*++
p
);
if
(
i
==
-
1
)
if
(
i
==
-
1
)
...
@@ -297,13 +297,15 @@ static BOOL unescape(WCHAR *str)
...
@@ -297,13 +297,15 @@ static BOOL unescape(WCHAR *str)
default:
default:
if
(
isdigitW
(
*
p
))
{
if
(
isdigitW
(
*
p
))
{
c
=
*
p
++
-
'0'
;
c
=
*
p
++
-
'0'
;
while
(
isdigitW
(
*
p
))
if
(
isdigitW
(
*
p
))
{
c
=
c
*
10
+
(
*
p
++
-
'0'
);
c
=
c
*
8
+
(
*
p
++
-
'0'
);
*
pd
++
=
c
;
if
(
isdigitW
(
*
p
))
continue
;
c
=
c
*
8
+
(
*
p
++
-
'0'
);
}
p
--
;
}
}
else
c
=
*
p
;
c
=
*
p
;
}
}
*
pd
++
=
c
;
*
pd
++
=
c
;
...
...
dlls/jscript/tests/api.js
View file @
50705c56
...
@@ -66,6 +66,8 @@ tmp = escape("a1b c!d+e@*-_+./,");
...
@@ -66,6 +66,8 @@ tmp = escape("a1b c!d+e@*-_+./,");
ok
(
tmp
===
"a1b%20c%21d+e@*-_+./%2C"
,
"escape('a1b c!d+e@*-_+./,') = "
+
tmp
);
ok
(
tmp
===
"a1b%20c%21d+e@*-_+./%2C"
,
"escape('a1b c!d+e@*-_+./,') = "
+
tmp
);
tmp
=
escape
();
tmp
=
escape
();
ok
(
tmp
===
"undefined"
,
"escape() = "
+
tmp
);
ok
(
tmp
===
"undefined"
,
"escape() = "
+
tmp
);
tmp
=
escape
(
'
\
u1234
\
123
\
xf3'
);
ok
(
tmp
==
"%u1234S%F3"
,
"escape('
\
u1234
\
123
\
xf3') = "
+
tmp
);
tmp
=
unescape
(
"abc"
);
tmp
=
unescape
(
"abc"
);
ok
(
tmp
===
"abc"
,
"unescape('abc') = "
+
tmp
);
ok
(
tmp
===
"abc"
,
"unescape('abc') = "
+
tmp
);
...
@@ -201,6 +203,12 @@ tmp = "abc".charCodeAt(true);
...
@@ -201,6 +203,12 @@ tmp = "abc".charCodeAt(true);
ok
(
tmp
===
0x62
,
"'abc'.charCodeAt(true) = "
+
tmp
);
ok
(
tmp
===
0x62
,
"'abc'.charCodeAt(true) = "
+
tmp
);
tmp
=
"abc"
.
charCodeAt
(
0
,
2
);
tmp
=
"abc"
.
charCodeAt
(
0
,
2
);
ok
(
tmp
===
0x61
,
"'abc'.charCodeAt(0,2) = "
+
tmp
);
ok
(
tmp
===
0x61
,
"'abc'.charCodeAt(0,2) = "
+
tmp
);
tmp
=
"
\
u49F4"
.
charCodeAt
(
0
);
ok
(
tmp
===
0x49F4
,
"'
\
u49F4'.charCodeAt(0) = "
+
tmp
);
tmp
=
"
\
052"
.
charCodeAt
(
0
);
ok
(
tmp
===
0x2A
,
"'
\
052'.charCodeAt(0) = "
+
tmp
);
tmp
=
"
\
xa2"
.
charCodeAt
(
0
);
ok
(
tmp
===
0xA2
,
"'
\
xa2'.charCodeAt(0) = "
+
tmp
);
tmp
=
"abcd"
.
substring
(
1
,
3
);
tmp
=
"abcd"
.
substring
(
1
,
3
);
ok
(
tmp
===
"bc"
,
"'abcd'.substring(1,3) = "
+
tmp
);
ok
(
tmp
===
"bc"
,
"'abcd'.substring(1,3) = "
+
tmp
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment