]> git.mxchange.org Git - friendica.git/commitdiff
Fix lack of HTML encoding for stylesheet link
authorAlexandre Alapetite <alexandre@alapetite.fr>
Fri, 16 Nov 2018 23:23:59 +0000 (00:23 +0100)
committerAlexandre Alapetite <alexandre@alapetite.fr>
Fri, 16 Nov 2018 23:23:59 +0000 (00:23 +0100)
Previous to the fix, the home page had a line like (notice the wrongly
encoded `&`):

```html
<link rel="stylesheet" href="view/theme/frio/style.pcss?f=&puid=1"
type="text/css" media="screen" />
```

src/App.php

index 445101309384a2f651b46fd69f78b507835538a4..013c12b90896265eddff33fc346d4d0865581746 100644 (file)
@@ -116,7 +116,7 @@ class App
        public function registerStylesheet($path)
        {
                $url = str_replace($this->getBasePath() . DIRECTORY_SEPARATOR, '', $path);
-
+               $url = htmlspecialchars($url, ENT_COMPAT, 'UTF-8');
                $this->stylesheets[] = trim($url, '/');
        }