Fungovanie tejto stránky je z dôvodu údržby dočasne obmedzené. Ak článok nevyrieši váš problém a chcete položiť otázku, napíšte našej komunite podpory na Twitter @FirefoxSupport alebo Reddit /r/firefox.

Vyhľadajte odpoveď

Vyhnite sa podvodom s podporou. Nikdy vás nebudeme žiadať, aby ste zavolali alebo poslali SMS na telefónne číslo alebo zdieľali osobné informácie. Nahláste prosím podozrivú aktivitu použitím voľby “Nahlásiť zneužitie”.

Ďalšie informácie

Firefox removes href attribute from anchor tag on copy paste

more options

Hi Support,

I have a text along with the image used as a hyperlink as follows.

"Sample Text.<a href="javascript:myfunction()"></a>"

When i copy the above text and paste it inside a HTML Control (for e.g. iframe), the control removes the href attribute of 'anchor' tag. It happens only with firefox and safari. It is working correctly in internet explorer.

"Sample Text.<a ></a>"

Is there any solution for this.? Awaiting for sooner response

Try clicking on the below link

http://screencast.com/t/sXq6BcZvJB

Hi Support, I have a text along with the image used as a hyperlink as follows. "Sample Text.<a href="javascript:myfunction()"><img title="sample image" src="sample.gif" /></a>" When i copy the above text and paste it inside a HTML Control (for e.g. iframe), the control removes the href attribute of 'anchor' tag. It happens only with firefox and safari. It is working correctly in internet explorer. "Sample Text.<a ><img title="sample image" src="sample.gif" /></a>" Is there any solution for this.? Awaiting for sooner response Try clicking on the below link http://screencast.com/t/sXq6BcZvJB

Všetky odpovede (1)

more options

I tested this in Gmail compose, and what I see is: regular links (href="url") are preserved during copy/paste, but javascript links (href="javascript:") are dropped/cleared.

I don't know whether this is by design. One place to research that would be https://bugzilla.mozilla.org/.