MCPcopy Index your code
hub / github.com/fluentpython/example-code-2e / html_quote

Function html_quote

21-async/mojifinder/bottle.py:2631–2634  ·  view source on GitHub ↗

Escape and quote a string to be used as an HTTP attribute.

(string)

Source from the content-addressed store, hash-verified

2629
2630
2631def html_quote(string):
2632 ''' Escape and quote a string to be used as an HTTP attribute.'''
2633 return '"%s"' % html_escape(string).replace('\n','
')\
2634 .replace('\r','
').replace('\t','	')
2635
2636
2637def yieldroutes(func):

Callers

nothing calls this directly

Calls 2

html_escapeFunction · 0.85
replaceMethod · 0.45

Tested by

no test coverage detected