Permalink
Browse files

BUGFIX: Eescape / in RegExp.

  • Loading branch information...
1 parent 8c075da commit 2457c4f0bcb8e30c1886abae2828c558d076106a @beerbohmdo committed Feb 27, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 core/Convert.php
  2. +1 −1 filesystem/File.php
View
@@ -308,7 +308,7 @@ static function html2raw($data, $preserveLinks = false, $wordWrap = 60, $config
$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][Dd]([^A-Za-z0-9>][^>]*)?> */", " ", $data);
+ $data = preg_replace("/<\/[Tt][Dd]([^A-Za-z0-9>][^>]*)?> */", " ", $data);
$data = preg_replace('/<\/p>/i', "\n\n", $data );
// Replace HTML entities
View
@@ -144,7 +144,7 @@ class File extends DataObject {
*/
static function find($filename) {
// 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.
$parts = explode("/", $filename);

0 comments on commit 2457c4f

Please sign in to comment.