Permalink
Browse files

Do not escape any characters for nowdoc strings

Summary: See title

Reviewed By: andrewjkennedy

Differential Revision: D7285006

fbshipit-source-id: 40baa5100139e346272cd551dc71ffb5c6f9de2a
  • Loading branch information...
vassilmladenov authored and hhvm-bot committed Mar 16, 2018
1 parent 6810730 commit 43c175a4f830a4394efa2b29357b166e97e2731a
Showing with 3 additions and 4 deletions.
  1. +3 −3 hphp/hack/src/utils/php_escaping.ml
  2. +0 −1 hphp/test/hhcodegen_failing_tests_zend
@@ -182,11 +182,11 @@ let unescape_single_or_nowdoc ~is_nowdoc s =
while !idx < len do
let c = next () in
if c <> '\\' then Buffer.add_char buf c else begin
if is_nowdoc || c <> '\\' then Buffer.add_char buf c else begin
let c = next () in
match c with
| '\'' when not is_nowdoc -> Buffer.add_char buf '\''
| '\\' when not is_nowdoc -> Buffer.add_char buf '\\'
| '\'' -> Buffer.add_char buf '\''
| '\\' -> Buffer.add_char buf '\\'
(* unrecognized escapes are just copied over *)
| c ->
Buffer.add_char buf '\\';
@@ -1,7 +1,6 @@
zend/good/Zend/tests/argument_restriction_004.php
zend/good/Zend/tests/bug43332_1.php
zend/good/Zend/tests/errmsg_039.php
zend/good/Zend/tests/nowdoc_016.php
zend/good/Zend/tests/objects_026.php
zend/good/Zend/tests/try_catch_finally_007.php
zend/good/Zend/tests/use_function/case_insensivity.php

0 comments on commit 43c175a

Please sign in to comment.