diff options
author | Andreas Gohr <andi@splitbrain.org> | 2014-02-02 17:52:32 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2014-02-02 17:52:32 +0100 |
commit | 73f25ac04a7caaa8cdb07bfc71e807f46f227f97 (patch) | |
tree | ae7906d95345d85c37e07fe49cf4e0af95507b7f /lib | |
parent | ad5be2d08559b834f85255bc802b4a6a6887af6b (diff) | |
download | rpg-73f25ac04a7caaa8cdb07bfc71e807f46f227f97.tar.gz rpg-73f25ac04a7caaa8cdb07bfc71e807f46f227f97.tar.bz2 |
fix error on CSS includes on windows
The regex wasn't properly escaped here which lead to problems when the
path contains backslashes. This is the root cause of the bug reported
at https://github.com/cosmocode/edittable/issues/19
Diffstat (limited to 'lib')
-rw-r--r-- | lib/exe/css.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/exe/css.php b/lib/exe/css.php index c96dedd37..f273b7ee4 100644 --- a/lib/exe/css.php +++ b/lib/exe/css.php @@ -456,8 +456,9 @@ class DokuCssFile { if (defined('DOKU_UNITTEST')) { $basedir[] = realpath(TMP_DIR); } - $regex = '#^('.join('|',$basedir).')#'; + $basedir = array_map('preg_quote_cb', $basedir); + $regex = '/^('.join('|',$basedir).')/'; $this->relative_path = preg_replace($regex, '', dirname($this->filepath)); } |