Grammalecte  Check-in [1097f9a5d9]

Overview
Comment:[fx] don’t remove HTML entities
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | fx
Files: files | file ages | folders
SHA3-256: 1097f9a5d9fb0b4c0b5fd80554760a5cf0d3c6a59ea72e4d898a43e65db8e4d5
User & Date: olr on 2020-09-02 09:40:00
Other Links: manifest | tags
Context
2020-09-03
09:30
[lo] lexicon editor: fix import and normalize personal dictionary name check-in: 4dd659124b user: olr tags: lo, trunk
2020-09-02
09:40
[fx] don’t remove HTML entities check-in: 1097f9a5d9 user: olr tags: fx, trunk
09:07
[graphspell] tokenizer: token OTHER as fallback check-in: e201630bf5 user: olr tags: graphspell, trunk
Changes

Modified gc_lang/fr/webext/content_scripts/editor.js from [9139e703d3] to [058bd04e59].

60
61
62
63
64
65
66

67

68
69
70
71
72
73
74
    },

    setParagraph: function (iParagraph, sParagraph) {
        this.dParagraphs.set(iParagraph, this.purgeText(sParagraph).normalize("NFC"));
    },

    purgeText: function (sText) {

        return sText.replace(/&nbsp;/g, " ").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/\r\n/g, "\n").replace(/\r/g, "\n");

    },

    clear: function () {
        this.dParagraphs.clear();
    }
}








>
|
>







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
    },

    setParagraph: function (iParagraph, sParagraph) {
        this.dParagraphs.set(iParagraph, this.purgeText(sParagraph).normalize("NFC"));
    },

    purgeText: function (sText) {
        console.log(sText);
        // return sText.replace(/&nbsp;/g, " ").replace(/&lt;/g, "<").replace(/&gt;/g, ">").replace(/&amp;/g, "&").replace(/\r\n/g, "\n").replace(/\r/g, "\n"); // probably useless now
        return sText.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
    },

    clear: function () {
        this.dParagraphs.clear();
    }
}