Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php abstract class PhabricatorRemarkupHyperlinkEngineExtension extends PhutilRemarkup..
Decoded Output download
<?php
abstract class PhabricatorRemarkupHyperlinkEngineExtension
extends PhutilRemarkupHyperlinkEngineExtension {
final protected function getSelfLinks(array $hyperlinks) {
assert_instances_of($hyperlinks, 'PhutilRemarkupHyperlinkRef');
$allowed_protocols = array(
'http' => true,
'https' => true,
);
$results = array();
foreach ($hyperlinks as $link) {
$uri = $link->getURI();
if (!PhabricatorEnv::isSelfURI($uri)) {
continue;
}
$protocol = id(new PhutilURI($uri))->getProtocol();
if (!isset($allowed_protocols[$protocol])) {
continue;
}
$results[] = $link;
}
return $results;
}
}
?>
Did this file decode correctly?
Original Code
<?php
abstract class PhabricatorRemarkupHyperlinkEngineExtension
extends PhutilRemarkupHyperlinkEngineExtension {
final protected function getSelfLinks(array $hyperlinks) {
assert_instances_of($hyperlinks, 'PhutilRemarkupHyperlinkRef');
$allowed_protocols = array(
'http' => true,
'https' => true,
);
$results = array();
foreach ($hyperlinks as $link) {
$uri = $link->getURI();
if (!PhabricatorEnv::isSelfURI($uri)) {
continue;
}
$protocol = id(new PhutilURI($uri))->getProtocol();
if (!isset($allowed_protocols[$protocol])) {
continue;
}
$results[] = $link;
}
return $results;
}
}
Function Calls
None |
Stats
MD5 | 7e6b8c5bf2a80570336ab0cabe0aa423 |
Eval Count | 0 |
Decode Time | 94 ms |