Index: gc_lang/fr/xpi/data/gc_panel.html ================================================================== --- gc_lang/fr/xpi/data/gc_panel.html +++ gc_lang/fr/xpi/data/gc_panel.html @@ -55,11 +55,11 @@

Erreur grammaticale.

Ignorer   - Voulez-vous en savoir plus ?… + Voulez-vous en savoir plus ?…
SUGGESTIONS :
Index: gc_lang/fr/xpi/data/gc_panel.js ================================================================== --- gc_lang/fr/xpi/data/gc_panel.js +++ gc_lang/fr/xpi/data/gc_panel.js @@ -93,10 +93,12 @@ } else if (xElem.tagName === "U" && xElem.id.startsWith("err") && xElem.className !== "corrected" && xElem.className !== "ignored") { showTooltip(xElem.id); } else if (xElem.id.startsWith("resize")) { self.port.emit("resize", xElem.id, 10); + } else if (xElem.id === "gc_url") { + self.port.emit("openURL", xElem.getAttribute("href")); } else { hideAllTooltips(); } } else if (xElem.tagName === "A") { self.port.emit("openURL", xElem.getAttribute("href")); @@ -253,11 +255,11 @@ startWaitIcon("paragr"+sIdParagr); let xNodeErr = document.getElementById("err" + sErrorId); xNodeErr.textContent = document.getElementById(sSuggId).textContent; xNodeErr.className = "corrected"; xNodeErr.removeAttribute("style"); - self.port.emit("correction", sIdParagr, document.getElementById("paragr"+sIdParagr).textContent); + self.port.emit("correction", sIdParagr, getPurgedTextOfParagraph("paragr"+sIdParagr)); hideAllTooltips(); stopWaitIcon("paragr"+sIdParagr); } catch (e) { showError(e); @@ -343,11 +345,11 @@ }*/ function sendBackAndCheck (sCheckButtonId) { // check startWaitIcon(); let sIdParagr = sCheckButtonId.slice(5); - self.port.emit("modifyAndCheck", sIdParagr, document.getElementById("paragr"+sIdParagr).textContent); + self.port.emit("modifyAndCheck", sIdParagr, getPurgedTextOfParagraph("paragr"+sIdParagr)); stopWaitIcon(); } function hideAllTooltips () { document.getElementById("gc_tooltip").style.display = "none"; @@ -376,10 +378,16 @@ } catch (e) { showError(e); } } + +function getPurgedTextOfParagraph (sNodeParagrId) { + let sText = document.getElementById(sNodeParagrId).textContent; + sText = sText.replace(/ /g, " ").replace(/</g, "<").replace(/>/g, ">").replace(/&/g, "&"); + return sText; +} function copyToClipboard () { startWaitIcon(); try { let xClipboardButton = document.getElementById("clipboard_msg");