commit
d6f88b0caa
4 changed files with 10 additions and 1 deletions
|
@ -53,11 +53,13 @@ class Markdown extends \Parsedown
|
||||||
|
|
||||||
private function purifyHtml($html) {
|
private function purifyHtml($html) {
|
||||||
$config = \HTMLPurifier_Config::createDefault();
|
$config = \HTMLPurifier_Config::createDefault();
|
||||||
|
|
||||||
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
|
$config->set('HTML.Doctype', 'XHTML 1.0 Transitional');
|
||||||
$config->set('HTML.Allowed', 'p,strong,em,b,a[href],i,span,ul,ol,li,cite,code,pre,br,blockquote,img');
|
$config->set('HTML.Allowed', 'p,strong,em,b,a[href],i,span,ul,ol,li,cite,code,pre,br,blockquote,img');
|
||||||
$config->set('HTML.AllowedAttributes', 'src, height, width, alt, href, class');
|
$config->set('HTML.AllowedAttributes', 'src, height, width, alt, href, class, rel');
|
||||||
$config->set('URI.AllowedSchemes', array('http' => true, 'https' => true, 'mailto' => true, 'ftp' => true));
|
$config->set('URI.AllowedSchemes', array('http' => true, 'https' => true, 'mailto' => true, 'ftp' => true));
|
||||||
$config->set('HTML.TargetBlank', true);
|
$config->set('HTML.TargetBlank', true);
|
||||||
|
$config->set('HTML.Nofollow', true);
|
||||||
|
|
||||||
$purifier = new \HTMLPurifier($config);
|
$purifier = new \HTMLPurifier($config);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,10 @@
|
||||||
{% extends "layout.twig" %}
|
{% extends "layout.twig" %}
|
||||||
{% import "macros.twig" as macro %}
|
{% import "macros.twig" as macro %}
|
||||||
|
|
||||||
|
{% block head %}
|
||||||
|
<link rel="canonical" href="https://github.com/matomo-org/matomo/{{ pull_request ? "pulls" : "issues" }}/{{ number|e('html_attr') }}" />
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
<title>{{ projectName }} {{ pull_request ? "Pull Request" : "Issue" }} #{{ number }} - {{ title }}</title>
|
<title>{{ projectName }} {{ pull_request ? "Pull Request" : "Issue" }} #{{ number }} - {{ title }}</title>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
<link href="/css/style.css" rel="stylesheet">
|
<link href="/css/style.css" rel="stylesheet">
|
||||||
|
|
||||||
{% block head %}
|
{% block head %}
|
||||||
|
<link rel="canonical" href="https://github.com/matomo-org/matomo/issues/" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
{% if currentPage != numPages %}
|
{% if currentPage != numPages %}
|
||||||
<link rel="next" href="{{ path_for('page', [], { 'page': nextPage }) }}"/>
|
<link rel="next" href="{{ path_for('page', [], { 'page': nextPage }) }}"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<link rel="canonical" href="https://github.com/matomo-org/matomo/issues/" />
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
Reference in a new issue