P149: Search Addon for Firefox
I have completed the search addon for firefox, it is available on github HERE. Unfortunately, the addon was rejected by the mozilla editors, due mostly to my use of InnerHTML. This can, apparently, be a security and performance risk.
The review stated:
1) Your add-on creates DOM nodes from HTML strings containing potentially unsanitized data, by assigning to innerHTML or through similar means. Aside from being inefficient, this is a major security risk. For more information, see https://developer.mozilla.org/en/XUL_School/DOM_Building_and_HTML_Insertion.
Ideally, I should have used DOM from the beginning to prevent this, but the app does work. I am in the process of recoding the innerHtml to DOM but it is proving to be more difficult than I thought. It is possible that what I am trying to do with this app isn’t really possible, or practical, with DOM.
I have also identified a bug that occurs when changing pages , where the content of the previous page is not reset.
The app should work in it’s current form however, and is a useful proof of concept for a first firefox addon.


