Exercises / prompt
Escape a close tag
escape_doc(text) replaces < with < and > with >, then wraps in <doc>...</doc>. Print escape of a payload that contains </doc>.
Live Pythonpython
Output
Run to execute this in your browser. Nothing is sent to a server.