Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122254864
PhutilRemarkupRuleEscapeRemarkup.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 16, 22:27
Size
370 B
Mime Type
text/x-php
Expires
Fri, Jul 18, 22:27 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27457017
Attached To
rPHU libphutil
PhutilRemarkupRuleEscapeRemarkup.php
View Options
<?php
/**
* @group markup
*/
final
class
PhutilRemarkupRuleEscapeRemarkup
extends
PhutilRemarkupRule
{
public
function
getPriority
()
{
return
0
;
}
public
function
apply
(
$text
)
{
if
(
strpos
(
$text
,
"
\1
"
)
===
false
)
{
return
$text
;
}
$replace
=
$this
->
getEngine
()->
storeText
(
"
\1
"
);
return
str_replace
(
"
\1
"
,
$replace
,
$text
);
}
}
Event Timeline
Log In to Comment