mirror of
https://github.com/gohugoio/hugoDocs.git
synced 2025-09-14 12:14:53 -04:00
parent
906f57b2d9
commit
e09fc0434e
@ -546,7 +546,6 @@ rendering the whole string as plain-text like this:
|
|||||||
<p>© 2015 Jane Doe. <a href="http://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.</p>
|
<p>© 2015 Jane Doe. <a href="http://creativecommons.org/licenses/by/4.0/">Some rights reserved</a>.</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<!--
|
|
||||||
### safeHTMLAttr
|
### safeHTMLAttr
|
||||||
Declares the provided string as a "safe" HTML attribute
|
Declares the provided string as a "safe" HTML attribute
|
||||||
from a trusted source, for example, ` dir="ltr"`,
|
from a trusted source, for example, ` dir="ltr"`,
|
||||||
@ -560,8 +559,6 @@ Example: Given a site-wide `config.toml` that contains this menu entry:
|
|||||||
|
|
||||||
* `<a href="{{ .URL }}">` ⇒ `<a href="#ZgotmplZ">` (Bad!)
|
* `<a href="{{ .URL }}">` ⇒ `<a href="#ZgotmplZ">` (Bad!)
|
||||||
* `<a {{ printf "href=%q" .URL | safeHTMLAttr }}>` ⇒ `<a href="irc://irc.freenode.net/#golang">` (Good!)
|
* `<a {{ printf "href=%q" .URL | safeHTMLAttr }}>` ⇒ `<a href="irc://irc.freenode.net/#golang">` (Good!)
|
||||||
-->
|
|
||||||
|
|
||||||
|
|
||||||
### safeCSS
|
### safeCSS
|
||||||
Declares the provided string as a known "safe" CSS string
|
Declares the provided string as a known "safe" CSS string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user