Do not rewrite absolute URLs

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2018-01-26 19:08:45 +01:00
parent cee941a6a3
commit 106af04355
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 3 additions and 3 deletions

View File

@ -242,8 +242,8 @@ class ThemingDefaults extends \OC_Defaults {
'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'" 'theming-background-mime' => "'" . $this->config->getAppValue('theming', 'backgroundMime', '') . "'"
]; ];
$variables['image-logo'] = "'".$this->urlGenerator->getAbsoluteURL($this->getLogo())."'"; $variables['image-logo'] = "'".$this->getLogo()."'";
$variables['image-login-background'] = "'".$this->urlGenerator->getAbsoluteURL($this->getBackground())."'"; $variables['image-login-background'] = "'".$this->getBackground()."'";
$variables['image-login-plain'] = 'false'; $variables['image-login-plain'] = 'false';
if ($this->config->getAppValue('theming', 'color', null) !== null) { if ($this->config->getAppValue('theming', 'color', null) !== null) {

View File

@ -298,7 +298,7 @@ class SCSSCacher {
* @return string * @return string
*/ */
private function rebaseUrls($css, $webDir) { private function rebaseUrls($css, $webDir) {
$re = '/url\([\'"]([\.\w?=\/-]*)[\'"]\)/x'; $re = '/url\([\'"]([^\/][\.\w?=\/-]*)[\'"]\)/x';
$subst = 'url(\''.$webDir.'/$1\')'; $subst = 'url(\''.$webDir.'/$1\')';
return preg_replace($re, $subst, $css); return preg_replace($re, $subst, $css);
} }