mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-10 01:06:20 +02:00
Remove trailing whitespace.
Signed-off-by: Edward Z. Yang <edwardzyang@thewritingpot.com>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
/**
|
||||
* Parses string hash files. File format is as such:
|
||||
*
|
||||
*
|
||||
* DefaultKeyValue
|
||||
* KEY: Value
|
||||
* KEY2: Value2
|
||||
@ -27,9 +27,9 @@
|
||||
*/
|
||||
class HTMLPurifier_StringHashParser
|
||||
{
|
||||
|
||||
|
||||
public $default = 'ID';
|
||||
|
||||
|
||||
/**
|
||||
* Parses a file that contains a single string-hash.
|
||||
*/
|
||||
@ -41,7 +41,7 @@ class HTMLPurifier_StringHashParser
|
||||
fclose($fh);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses a file that contains multiple string-hashes delimited by '----'
|
||||
*/
|
||||
@ -56,7 +56,7 @@ class HTMLPurifier_StringHashParser
|
||||
fclose($fh);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Internal parser that acepts a file handle.
|
||||
* @note While it's possible to simulate in-memory parsing by using
|
||||
@ -84,7 +84,8 @@ class HTMLPurifier_StringHashParser
|
||||
$single = true;
|
||||
if (strpos($line, ':') !== false) {
|
||||
// Single-line declaration
|
||||
list($state, $line) = explode(': ', $line, 2);
|
||||
list($state, $line) = explode(':', $line, 2);
|
||||
$line = trim($line);
|
||||
} else {
|
||||
// Use default declaration
|
||||
$state = $this->default;
|
||||
@ -100,5 +101,5 @@ class HTMLPurifier_StringHashParser
|
||||
} while (!feof($fh));
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user