ThisDisaster ThisDisaster - 1 month ago 5x
HTML Question

Import XML with local HTML

I created this HTML file to add TPLs and a Search Engine to IE11:

<a href="javascript:window.external.msAddTrackingProtectionList('','Adware filter')">Adware filter</a>
<a href="javascript:window.external.msAddTrackingProtectionList('','EasyList')">EasyList</a>
<a href="javascript:window.external.msAddTrackingProtectionList('','EasyPrivacy')">EasyPrivacy</a>
<a href="javascript:window.external.msAddTrackingProtectionList('','Fanboy Annoyances')">Fanboy Annoyances</a>
<a href="javascript:window.external.msAddTrackingProtectionList('','Malware Domains')">Malware Domains</a>
<a href="javascript:window.external.AddSearchProvider('./Google.xml')">add Google</a>

Adding TPLs fork flawless, but somehow I can't add the custom search engine.
When I change it to this:

<a href="javascript:window.external.AddSearchProvider('')">add Google</a>

it works, but it doesn't when its a local file. I even downloaded the xml manually from Microsoft, still it didn't work.

Any tips?


Issue :

  1. Location of your xml file.
  2. XML specified on is invalid.(When you store it on local machine.)

Fix :

  1. Put your xml on correct location
  2. To validate that xml you have to escape ampersands ('&') in given xml. To do so replace all '&' with '&' in your xml and your code will work.I tested this on my machine.

Hope this will work for you.

You can check following screenshot. After changes Your code is working for me .

enter image description here

My Folder structure :

books.xml contains GoogleAddOns xml content. And my html code for xml file

<a href="javascript:window.external.AddSearchProvider('./books.xml')">add

enter image description here