Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106635034
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
Sat, Mar 29, 01:17
Size
317 B
Mime Type
text/x-php
Expires
Mon, Mar 31, 02:17 (2 d)
Engine
blob
Format
Raw Data
Handle
25114982
Attached To
rPHU libphutil
PhutilRemarkupRuleEscapeRemarkup.php
View Options
<?php
/**
* @group markup
*/
final
class
PhutilRemarkupRuleEscapeRemarkup
extends
PhutilRemarkupRule
{
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