2

When tracking the following code in firebug :

e.innerHTML = h;

e.innerHTML becomes :

<img src="https://local.domainname.com/images/homepage/0813_payanywhere_promo.jpg" mce_src="/images/homepage/0813_payanywhere_promo.jpg" height="106" width="108">

when h is :

<img src="/images/homepage/0813_payanywhere_promo.jpg" height="106" width="108">

The issue is that (only in firefox - I'm using 24.0) e.innerHTML prepends the fully qualified domain name (including the https protocol) to the src attribute value. msc_src is an attribute that tinyMCE uses and is not a problem.

I've also tried to see if using mootools would stop this issue (i.e., $(e).set('html', h);), but it does not.

As background, I'm using tinyMCE (3.2.6) in the Joomla Administrator (Joomla 1.5.26) to create a module which contains an image. I use https for my administrator and http for my front end.

Any help greatly appreciated.

Kenn Baker
  • 43
  • 4
  • Do you see the problem here http://jsfiddle.net/79UCS/ ? – Sergio Oct 06 '13 at 06:41
  • Thanks for the response Sergio. – Kenn Baker Oct 08 '13 at 04:09
  • I was looking for a way to handle any input of html into the tinyMCE WYSIWYG editor, and ff is adding the fully qualified domain name (i.e., https://local.domainname.com) onto the src attribute of all img tags inserted using tinyMCE. tinyMCE is used in the Joomla administrator, which runs on https. When front end users view the content of what's been input, the images are sourced from https not http. This is causing issues. I ended up removing the fully qualified domain name right after it was incorrectly added. Not a fix, but at least a workaround that works. – Kenn Baker Oct 08 '13 at 04:20

0 Answers0