Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F92632687
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
Fri, Nov 22, 06:04
Size
317 B
Mime Type
text/x-php
Expires
Sun, Nov 24, 06:04 (2 d)
Engine
blob
Format
Raw Data
Handle
22465560
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