Compare commits

...

2 Commits

Author SHA1 Message Date
Christophe HENRY d68b403f33 Fixes bug about CSS not applied correctly
The default CSS was loaded anyway, in addition to the custom css.
2022-07-29 15:17:52 +02:00
Christophe HENRY b5083aaabd Fixes a bug about null by ref variable 2022-07-29 15:17:36 +02:00
2 changed files with 3 additions and 1 deletions

View File

@ -128,11 +128,12 @@ if ("none" == $style) {
# Warning, using htmhem.php?url=… will make $localCss not found
# as the path is relative to htmgem.php and not / !
$gt_html->addCss($localCss);
} else { // No local style
$gt_html->addCss($php_self_dir."/css/htmgem.css");
}
} else { #TODO: regex check for $style
$gt_html->addCss("$php_self_dir/css/$style.css");
}
if (empty($gt_html->getCss)) $gt_html->addCss($php_self_dir."/css/htmgem.css");
if ($urlRewriting)
echo \htmgem\html\getHtmlWithMenu($gt_html, $scheme, $domain, $url);

View File

@ -319,6 +319,7 @@ class GemtextTranslate_html {
protected static function spacesCompress(&$text) {
# Replaces several spaces (0x20) by only one
if (empty($text)) $text = "";
$text = preg_replace("/ +/", " ", $text);
}