01: package fat;
02:
03: import fit.*;
04:
05: public class HtmlToTextFixture extends ColumnFixture {
06: public String HTML;
07:
08: public String Text() {
09: HTML = HTML.replaceAll("\\\\u00a0", "\u00a0");
10: return escapeAscii(Parse.htmlToText(HTML));
11: }
12:
13: private String escapeAscii(String text) {
14: text = text.replaceAll("\\x0a", "\\\\n");
15: text = text.replaceAll("\\x0d", "\\\\r");
16: text = text.replaceAll("\\xa0", "\\\\u00a0");
17: return text;
18: }
19: }
|