comicbox.readinglists.text ¶
Text from outside, made safe once.
A reading list’s strings come from files and from the network. Control characters in them can make a CBL that XML cannot read back, or reach a terminal as escape sequences, so they are removed when a list is loaded, with a warning naming where.
clean_text(text) ¶
Remove control characters a list’s text may not hold.
Source code in comicbox/readinglists/text.py
22 23 24 | |
clean_tree(value, warnings, path='') ¶
Remove control characters from every string in a parsed list.
Each string that loses any is named in warnings by its path, as the load’s other warnings are: name, entries #3.series.name.
Source code in comicbox/readinglists/text.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | |
printable(text) ¶
Make outside text safe for one terminal line.
Source code in comicbox/readinglists/text.py
27 28 29 | |