mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-31 08:58:20 +01:00
Minor change to suppress linter warning
Summary: Explicitly declare the delimiter for `preg_quote`. Test Plan: `arc lint` Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D11914
This commit is contained in:
parent
a55fb95bd5
commit
48569f3629
2 changed files with 5 additions and 5 deletions
|
@ -61,7 +61,7 @@ final class DarkConsoleDataController extends PhabricatorController {
|
||||||
|
|
||||||
// Because cookie names can now be prefixed, wipe out any cookie value
|
// Because cookie names can now be prefixed, wipe out any cookie value
|
||||||
// with the session cookie name anywhere in its name.
|
// with the session cookie name anywhere in its name.
|
||||||
$pattern = '('.preg_quote(PhabricatorCookies::COOKIE_SESSION).')';
|
$pattern = '#'.preg_quote(PhabricatorCookies::COOKIE_SESSION, '#').'#';
|
||||||
foreach ($_COOKIE as $cookie_name => $cookie_value) {
|
foreach ($_COOKIE as $cookie_name => $cookie_value) {
|
||||||
if (preg_match($pattern, $cookie_name)) {
|
if (preg_match($pattern, $cookie_name)) {
|
||||||
$panel = PhutilSafeHTML::applyFunction(
|
$panel = PhutilSafeHTML::applyFunction(
|
||||||
|
|
|
@ -163,15 +163,15 @@ abstract class PhabricatorObjectRemarkupRule extends PhutilRemarkupRule {
|
||||||
|
|
||||||
private function getObjectEmbedPattern() {
|
private function getObjectEmbedPattern() {
|
||||||
$prefix = $this->getObjectNamePrefix();
|
$prefix = $this->getObjectNamePrefix();
|
||||||
$prefix = preg_quote($prefix);
|
$prefix = preg_quote($prefix, '#');
|
||||||
$id = $this->getObjectIDPattern();
|
$id = $this->getObjectIDPattern();
|
||||||
|
|
||||||
return '(\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B)u';
|
return '#\B{'.$prefix.'('.$id.')([,\s](?:[^}\\\\]|\\\\.)*)?}\B#u';
|
||||||
}
|
}
|
||||||
|
|
||||||
private function getObjectReferencePattern() {
|
private function getObjectReferencePattern() {
|
||||||
$prefix = $this->getObjectNamePrefix();
|
$prefix = $this->getObjectNamePrefix();
|
||||||
$prefix = preg_quote($prefix);
|
$prefix = preg_quote($prefix, '@');
|
||||||
|
|
||||||
$id = $this->getObjectIDPattern();
|
$id = $this->getObjectIDPattern();
|
||||||
|
|
||||||
|
@ -192,7 +192,7 @@ abstract class PhabricatorObjectRemarkupRule extends PhutilRemarkupRule {
|
||||||
// The "\b" allows us to link "(abcdef)" or similar without linking things
|
// The "\b" allows us to link "(abcdef)" or similar without linking things
|
||||||
// in the middle of words.
|
// in the middle of words.
|
||||||
|
|
||||||
return '((?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w))u';
|
return '@(?<![#-])'.$boundary.$prefix.'('.$id.')(?:#([-\w\d]+))?(?!\w)@u';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue