BUGFIX: Eescape / in RegExp.

This commit is contained in:
AngryPHPNerd 2012-02-28 00:44:27 +01:00
parent 8c075dab9c
commit 2457c4f0bc
2 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ class Convert {
$data = preg_replace("/<[Bb][Rr]([^A-Za-z0-9>][^>]*)?> */", "\n", $data); $data = preg_replace("/<[Bb][Rr]([^A-Za-z0-9>][^>]*)?> */", "\n", $data);
$data = preg_replace("/<[Tt][Rr]([^A-Za-z0-9>][^>]*)?> */", "\n", $data); $data = preg_replace("/<[Tt][Rr]([^A-Za-z0-9>][^>]*)?> */", "\n", $data);
$data = preg_replace("/</[Tt][Dd]([^A-Za-z0-9>][^>]*)?> */", " ", $data); $data = preg_replace("/<\/[Tt][Dd]([^A-Za-z0-9>][^>]*)?> */", " ", $data);
$data = preg_replace('/<\/p>/i', "\n\n", $data ); $data = preg_replace('/<\/p>/i', "\n\n", $data );
// Replace HTML entities // Replace HTML entities

View File

@ -144,7 +144,7 @@ class File extends DataObject {
*/ */
static function find($filename) { static function find($filename) {
// Get the base file if $filename points to a resampled file // Get the base file if $filename points to a resampled file
$filename = preg_replace('/_resampled/[^-]+-/', '', $filename); $filename = preg_replace('/_resampled\/[^-]+-/', '', $filename);
// Split to folders and the actual filename, and traverse the structure. // Split to folders and the actual filename, and traverse the structure.
$parts = explode("/", $filename); $parts = explode("/", $filename);