#599 ✓resolved

GM_safeHTMLParser removes "<a href ...>" attribute!

Reported by Enkidu | March 2nd, 2012 @ 03:40 PM

  1. Your operating system (and version)
    Win 7 64bit

  2. Your browser (and version)
    Firefox 10.0.2

  3. The version of Scriptish you are using

  4. Your language and/or locale (e.g. "en-US")

  5. Clear steps to reproduce the bug (including a reduced-case user script, if applicable)

var node = GM_safeHTMLParser( (<><![CDATA[
<li class="separator actions">
<a href="/app/message?op=private_message;scr_rec_id=1234567.890123" data-lightbox-params="name=JoeUser;sc_o=hcard-write" class="icn-img-link icn-ext-info-msg message-lightbox-link">
Nachricht schreiben

;(function() {
$("#some_id").click(function(event) {
new Array("#sd_3643966", "3643966.d6d8e9");
]]></>).toString() );
alert( $( '.icn-ext-info-msg', node )[0].href ); // ==>> empty! :-(
alert( $( '.icn-ext-info-msg', node )[0].parentNode.innerHTML );

_6. Any error messages seen in the Error Console

_7. A description of what you expected to happen
I get this code by an ajax-http-request and want to extract the url from href="...".
I expect

alert( $( '.icn-ext-info-msg', node )[0].href );

is returning the url of the original code. In my example "/app/message?op=private_message;scr_rec_id=1234567.890123".

_8. A description of what actually happened

alert( $( '.icn-ext-info-msg', node )[0].parentNode.innerHTML );


<a xmlns="http://www.w3.org/1999/xhtml" class="icn-img-link icn-ext-info-msg message-lightbox-link" data-lightbox-params="name=JoeUser;sc_o=hcard-write">
Nachricht schreiben



Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket