| changeset 154 | 8cb89c153140 |
| parent 0 | 40c8f766c9b8 |
| child 175 | 4f072edc51a1 |
| 144:e7e1bc64f613 | 154:8cb89c153140 |
|---|---|
17 |
17 |
18 |
18 |
19 # utilities |
19 # utilities |
20 def get_text_nodes(soup): |
20 def get_text_nodes(soup): |
21 return soup(text=lambda text:not isinstance(text, Comment)) |
21 return soup(text=lambda text:not isinstance(text, Comment)) |
22 |
|
23 |
|
24 import re |
|
25 |
|
26 def cleanup_textarea(input): |
|
27 """ |
|
28 Cleanup \r\n to standard \n |
|
29 """ |
|
30 return re.sub('(\r\n)|(\n)|(\r)','\n',input) |