Title: Don&#8217;t replace XML namespaces (xmlns) when forcing HTTPS
Last modified: September 2, 2019

---

# Don’t replace XML namespaces (xmlns) when forcing HTTPS

 *  Resolved [dzsani](https://wordpress.org/support/users/dzsani/)
 * (@dzsani)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/)
 * When enabling the HTTPS feature, SG Optimizer blindly replaces every ‘http’ occurrences
   even in plugin and theme files. This breaks a lot of plugins and themes as they
   use assets containing XML namespaces. Common namespaces are:
 * [http://www.w3.org/2000/svg](http://www.w3.org/2000/svg)
    [http://www.w3.org/1999/xhtml](http://www.w3.org/1999/xhtml)
 * These aren’t real URLs, they just happen to follow an URL-like syntax. Replacing
   these can lead to JavaScript errors. Most notably, the GreenSock animation engine,
   which is used by many WordPress plugins and themes is completely broken and cannot
   be fixed even after disabling SG Optimizer.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Stanimir Stoyanov](https://wordpress.org/support/users/sstoqnov/)
 * (@sstoqnov)
 * SiteGround Representative
 * [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/#post-11894226)
 * Hey [@dzsani](https://wordpress.org/support/users/dzsani/)
 * Our replace functionality replace only the home url occurrences in the content,
   not every link starting with http.
 * Would it be possible to provide an example or where we can check the issue?
 * Regards,
    Stanimir
 *  Thread Starter [dzsani](https://wordpress.org/support/users/dzsani/)
 * (@dzsani)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/#post-11894400)
 * Hi Stanimir,
 * Thanks for your reply!
 * Maybe I’ve got this wrong. I’m trying to eliminate an issue where these XML namespace“
   URLs” are overwritten directly in our plugin files (in GreenSock more specifically)
   causing JavaScript errors. Multiple customers of ours are having this issue and
   I’ve noticed that SG Optimizer was present on their sites and was the only plugin
   that seemed relevant to this issue.
 * Since we can’t share customer information, I cannot provide you an example. Based
   on your reply it seems the issue might not be SG Optimizer after all. We’re still
   investigating where this issue originates from. Sorry if it was a false report,
   but it seemed likely at the time due to the rule of elimination.
 * Best regards,
    John
 *  Plugin Author [Stanimir Stoyanov](https://wordpress.org/support/users/sstoqnov/)
 * (@sstoqnov)
 * SiteGround Representative
 * [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/#post-11894436)
 * As a workaround for the js errors you could split the xml link so it won’t be
   replaced
 * `variable = "http://www.w3.org/2000/svg'`
    should become `variable = "http" +"://
   www.w3.org/2000/svg"`
 * Regards,
    Stanimir
 *  Thread Starter [dzsani](https://wordpress.org/support/users/dzsani/)
 * (@dzsani)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/#post-11894514)
 * Thanks for the tip. We’re approaching this from multiple angles and we’re actually
   in the midst of releasing an update with a very similar workaround. I’ll continue
   looking for the source of the issue since I also want to let the appropriate 
   author know about this.
 * Best regards,
    John

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Don’t replace XML namespaces (xmlns) when forcing HTTPS’ is closed to
new replies.

 * ![](https://ps.w.org/sg-cachepress/assets/icon-256x256.gif?rev=2971889)
 * [Speed Optimizer - The All-In-One Performance-Boosting Plugin](https://wordpress.org/plugins/sg-cachepress/)
 * [Support Threads](https://wordpress.org/support/plugin/sg-cachepress/)
 * [Active Topics](https://wordpress.org/support/plugin/sg-cachepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sg-cachepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sg-cachepress/reviews/)

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [namespace](https://wordpress.org/support/topic-tag/namespace/)

 * 4 replies
 * 2 participants
 * Last reply from: [dzsani](https://wordpress.org/support/users/dzsani/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/dont-replace-xml-namespaces-xmlns-when-forcing-https/#post-11894514)
 * Status: resolved