[Mozilla Enterprise] Format of inline IconURL for SearchEngines in policies.json ?

James Pearson james-p at moving-picture.com
Tue Jun 26 16:10:33 UTC 2018


Felipe Gomes wrote:
> 
> Can you set the following two prefs in about:config
> 
> browser.search.log to true > browser.policies.loglevel to debug
> 
> and then make some change to your SearchEngines policy so that the
> engine gets recreated? Then there should be some logging available in
> the Error Console to find out where is the problem.

Strangely enough, I had already started playing with those prefs :-)

It looks like the IconURL is not being used at all when using policies - 
even for URLs like "http://..."

Setting browser.search.log to true when using Search Plugins set up via 
CCK2, then I see the message:

_setIcon: Setting icon url "data:image/png;base64,iVBORw0KG..." for 
engine "Intranet Search".

(where "Intranet Search" is my custom search)

But, using policies.json, I do not get that message in the log ...

I get the '_setIcon:' log messages for the built-in Search Engines in 
both cases

The _setIcon: log out put comes from 'setIcon: function 
SRCH_ENG_setIcon()' in toolkit/components/search/nsSearchService.js - 
the code does:

_setIcon: function SRCH_ENG_setIcon(aIconURL, aIsPreferred, aWidth, 
aHeight) {
     var uri = makeURI(aIconURL);

     // Ignore bad URIs
     if (!uri)
       return;

     LOG("_setIcon: Setting icon url \"" + limitURILength(uri.spec) + 
"\" for engine \""
        + this.name + "\".");

So I'm guessing that it is failing at makeURI() ???

Should I submit a bug?

James Pearson


More information about the Enterprise mailing list