Skip to content

Commit

Permalink
Fixed textboxes which can be broken via injected text (fragile XUL Fr…
Browse files Browse the repository at this point in the history
…agment parsing)
  • Loading branch information
RealRaven2000 committed Dec 3, 2020
1 parent 70dcf54 commit 79f1f07
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
7 changes: 4 additions & 3 deletions content/fq_FilterEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,14 +444,15 @@
es.appendChild(MozXULElement.parseXULToFragment(`
<toolbarbutton image="resource://filtaquilla-skin/script_edit.png" class="focusbutton fq-javascript"></toolbarbutton>
<html:input flex="1" class="search-value-textbox flexinput" inherits="disabled" newlines="pasteintact"
value = "` + es.getAttribute("value") + `"
onchange="this.parentNode.setAttribute('value', this.value); this.parentNode.value=this.value;"></html:input>
`));
`));

// XXX: Implement `this.inheritAttribute()` for the [inherits] attribute in the markup above!

let hbox = es, // es.parentNode.getElementsByTagName("hbox")[0], // document.getAnonymousNodes(this)[0];
textbox = hbox.children[1], // document.getAnonymousNodes(es)[1];
toolbarbutton = hbox.children[0]; // document.getAnonymousNodes(es)[0];
textbox.value = es.getAttribute("value");
toolbarbutton.addEventListener("command", es.onCommand, false);
toolbarbutton.setAttribute('tooltiptext', util.getBundleString('filtaquilla.editJavascript', "Edit JavaScript…"));
hbox.classList.add("flexelementcontainer");
Expand All @@ -470,11 +471,11 @@
try {
let textbox = window.MozXULElement.parseXULToFragment(
` <html:input class="search-value-textbox flexinput fq-textbox" inherits="disabled"
value = "` + es.getAttribute("value") + `"
onchange="this.parentNode.setAttribute('value', this.value); this.parentNode.value=this.value;">
</html:input>`
);
es.appendChild(textbox);
es.lastChild.value = es.getAttribute("value");
es.classList.add("flexelementcontainer");
es.setAttribute('fq-patched', "true");
return true;
Expand Down
4 changes: 2 additions & 2 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifest_version" : 2,
"name" : "FiltaQuilla",
"description" : "Mail filter custom actions and searches",
"version" : "3.0pre44",
"version" : "3.0pre46",
"default_locale": "en",
"author" : "R Kent James,Axel Grude",
"developer" : {
Expand All @@ -12,7 +12,7 @@
"applications" : {
"gecko" : {
"id" : "[email protected]",
"strict_min_version" : "68.0",
"strict_min_version" : "74.0",
"strict_max_version" : "78.*"
}
},
Expand Down
14 changes: 9 additions & 5 deletions release-notes.html
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
<b>Version 2.0</b>
<b>Version 3.0</b>

Made Compatible with THunderbird 68. FiltaQuilla had to be largely rewritten for Thunderbird 68, with substantial help from <a href="https://github.com/ptomulik" target="_blank">Paweł Tomulik</a>.
Made Compatible with THunderbird 68. Again, FiltaQuilla had to be largely rewritten for Thunderbird 78, because support for some key technologies was deprecated by Mozilla (bindings was central to making the filter editor work, so there was numerous days of work and guessing necessary to get it back on track.</a>.

Going forward most bugfixes / new features will be exclusively available for Thunderbird 68. The reason for this is that through architectural changes on the Mozilla code platform the code for Thunderbird 60 and earlier is substantially different.
Going forward most bugfixes / new features will be exclusively available for Thunderbird 78 - but there may be some minor backports for Thunderbird 68. The reason for this is that through architectural changes on the Mozilla code platform the code for Thunderbird 68 and earlier is substantially different.

<ul>
<li> Check the new <a href="https://github.com/RealRaven2000/FiltaQuilla/issues">Issue Tracker</a> for open problems and to add feature requests.</li>
<li> Added links to the quickFilters page for supporting the development team. </li>
<li> <a href="https://github.com/RealRaven2000/FiltaQuilla/issues/14">[issue 14]</a> Make quickFilters compatible with Thunderbird 78 ESR. The gruelling detail on all the necessary work can be read there.</li>
<li> All bindings were replaced with pure JavaScript. This affected editing <i>all</i> conditions that FiltaQuilla adds to the Filter Editor.</li>
<li> Printing didn't work anymore </p>
<li> <a href="https://github.com/RealRaven2000/FiltaQuilla/issues/45">[issue 45]</a> Fixed "Move later" / "Copy as Read" For Thunderbird versions > 64 </li>

</ul>

<strong>Support My Work</strong>

As I am often asked about added features for filter conditions and actions for my Add-on <a href="https://addons.thunderbird.net/addon/quickfilters/">quickFilters</a> this is a good location for extending Filter behavior.
As I am often asked about added features for filter conditions and actions for my Add-on <a href="https://addons.thunderbird.net/addon/quickfilters/">quickFilters</a> - FiltaQuilla is a better location for extending Filter behavior - specifically adding new types of Actions and Conditions.

If you want to <b>support the FiltaQuilla project</b>, please install quickFilters and
<strong>purchase a <a href="https://quickfilters.quickfolders.org/premium.html">quickFilters Pro</a> license.</strong>
Expand Down

0 comments on commit 79f1f07

Please sign in to comment.