Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15415161
D9182.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D9182.diff
View Options
diff --git a/src/lint/linter/ArcanistXHPASTLinter.php b/src/lint/linter/ArcanistXHPASTLinter.php
--- a/src/lint/linter/ArcanistXHPASTLinter.php
+++ b/src/lint/linter/ArcanistXHPASTLinter.php
@@ -2389,15 +2389,22 @@
// Double quoted strings are allowed when the string contains the
// following characters.
static $allowed_chars = array(
- '\0',
'\n',
'\r',
- '\f',
'\t',
'\v',
- '\x',
- '\b',
+ '\e',
+ '\f',
'\'',
+ '\0',
+ '\1',
+ '\2',
+ '\3',
+ '\4',
+ '\5',
+ '\6',
+ '\7',
+ '\x',
);
$contains_special_chars = false;
diff --git a/src/lint/linter/__tests__/xhpast/double-quote.lint-test b/src/lint/linter/__tests__/xhpast/double-quote.lint-test
--- a/src/lint/linter/__tests__/xhpast/double-quote.lint-test
+++ b/src/lint/linter/__tests__/xhpast/double-quote.lint-test
@@ -8,6 +8,9 @@
pht(
"This string requires \x12\x34 double quotes, but ".
"this string does not. Here, they are used for consistency.");
+pht(
+ "This string also requires \123\345 double quotes, but ".
+ "this string does not. Here, they are used for consistency.");
~~~~~~~~~~
advice:3:1
~~~~~~~~~~
@@ -21,3 +24,6 @@
pht(
"This string requires \x12\x34 double quotes, but ".
"this string does not. Here, they are used for consistency.");
+pht(
+ "This string also requires \123\345 double quotes, but ".
+ "this string does not. Here, they are used for consistency.");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 4:30 AM (1 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7500111
Default Alt Text
D9182.diff (1 KB)
Attached To
Mode
D9182: Fix the `ArcanistXHPASTLinter` single quote rule.
Attached
Detach File
Event Timeline
Log In to Comment