mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
commit
6829c151ad
@ -235,10 +235,6 @@ class Convert {
|
||||
$config = $defaultConfig;
|
||||
}
|
||||
|
||||
// sTRIp style and script
|
||||
/* $data = eregi_replace("<style(^A-Za-z0-9>][^>]*)?>.*</style[^>]*>","", $data);*/
|
||||
/* $data = eregi_replace("<script(^A-Za-z0-9>][^>]*)?>.*</script[^>]*>","", $data);*/
|
||||
|
||||
$data = preg_replace("/<style([^A-Za-z0-9>][^>]*)?>.*?<\/style[^>]*>/is","", $data);
|
||||
$data = preg_replace("/<script([^A-Za-z0-9>][^>]*)?>.*?<\/script[^>]*>/is","", $data);
|
||||
|
||||
@ -250,9 +246,6 @@ class Convert {
|
||||
if(!$preserveLinks && !$config['PreserveLinks']) {
|
||||
$data = preg_replace('/<a[^>]*href\s*=\s*"([^"]*)">(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data);
|
||||
$data = preg_replace('/<a[^>]*href\s*=\s*([^ ]*)>(.*?)<\/a>/ie', "Convert::html2raw('\\2').'[\\1]'", $data);
|
||||
|
||||
/* $data = eregi_replace('<a[^>]*href *= *"([^"]*)">([^<>]*)</a>', '\\2 [\\1]', $data); */
|
||||
/* $data = eregi_replace('<a[^>]*href *= *([^ ]*)>([^<>]*)</a>', '\\2 [\\1]', $data); */
|
||||
}
|
||||
|
||||
// Replace images with their alt tags
|
||||
|
6
thirdparty/simpletest/http.php
vendored
6
thirdparty/simpletest/http.php
vendored
@ -316,7 +316,7 @@ class SimpleHttpHeaders {
|
||||
$this->_cookies = array();
|
||||
$this->_authentication = false;
|
||||
$this->_realm = false;
|
||||
foreach (split("\r\n", $headers) as $header_line) {
|
||||
foreach (preg_split("/\r\n/", $headers) as $header_line) {
|
||||
$this->_parseHeaderLine($header_line);
|
||||
}
|
||||
}
|
||||
@ -457,7 +457,7 @@ class SimpleHttpHeaders {
|
||||
* @access private
|
||||
*/
|
||||
function _parseCookie($cookie_line) {
|
||||
$parts = split(";", $cookie_line);
|
||||
$parts = preg_split('/;/', $cookie_line);
|
||||
$cookie = array();
|
||||
preg_match('/\s*(.*?)\s*=(.*)/', array_shift($parts), $cookie);
|
||||
foreach ($parts as $part) {
|
||||
@ -521,7 +521,7 @@ class SimpleHttpResponse extends SimpleStickyError {
|
||||
$this->_setError('Could not split headers from content');
|
||||
$this->_headers = new SimpleHttpHeaders($raw);
|
||||
} else {
|
||||
list($headers, $this->_content) = split("\r\n\r\n", $raw, 2);
|
||||
list($headers, $this->_content) = preg_split("/\r\n\r\n/", $raw, 2);
|
||||
$this->_headers = new SimpleHttpHeaders($headers);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user