@@ -58,7 +58,29 @@ for person in staff_members:
5858 ))
5959```
6060
61- ### HTML comments
61+ ## Rendering options
62+
63+ If you need more control over how PyHTML renders your output HTML, you can use
64+ the [ ` p.RenderOptions ` ] [ pyhtml.RenderOptions ] class to specify these.
65+
66+ For example, if you don't want any whitespace between your HTML components,
67+ you can use ` p.RenderOptions(spacing="") ` to remove it.
68+
69+ ``` py
70+ >> > import pyhtml as p
71+ >> > print (str (p.div(p.RenderOptions(spacing = " " ))(
72+ ... p.i(" No" ),
73+ ... p.b(" spaces" ),
74+ ... p.u(" here!" )
75+ ... )))
76+ < div>< i> No< / i>< b> spaces< / b>< u> here!< / u>< / div>
77+
78+ ```
79+
80+ For more information about the specific allowed properties, view
81+ [ this documentation] [ pyhtml.RenderOptions ] .
82+
83+ ## HTML comments
6284
6385You can add comments to HTML by using the ` Comment ` tag. These will be included
6486in the output HTML, which can be useful for debugging your server from your web
@@ -77,8 +99,8 @@ browser.
7799## Embedding raw HTML
78100
79101By default, PyHTML [ escapes certain characters] ( https://www.w3schools.com/html/html_entities.asp )
80- within strings passed to tags. This is done to avoid user content from taking
81- control of your resultant webpages in what is called a
102+ within strings passed to tags. This is done to prevent user content from taking
103+ control of your webpages in what is called a
82104[ cross-site scripting (XSS) attack] ( https://owasp.org/www-community/attacks/xss/ ) .
83105
84106Sometimes, you may wish to embed an existing HTML string inside of PyHTML. You
@@ -94,13 +116,13 @@ can do this using the `p.DangerousRawHtml` tag.
94116
95117*** Be careful though!*** PyHTML escapes these sequences for good reason, so
96118don't use ` DangerousRawHtml ` unless you have a * very good reason* , and are
97- certain that your text is trusted.
119+ certain that the text you are passing it is trusted.
98120
99121## Custom tags
100122
101123Since this library includes all modern HTML tags, it is very unlikely that
102124you'll need to do create a custom tag. However if you really need to, you can
103- use the ` create_tag ` function
125+ use the ` create_tag ` function.
104126
105127``` py
106128>> > import pyhtml as p
0 commit comments