It has been reported earlier that using a bookmarklet with storylink causes the ampersand to be escaped.

I suggest the following patch to fix it:

--- vote_storylink.module.orig  2008-02-26 07:00:36.000000000 -0500
+++ vote_storylink.module       2008-02-26 06:52:51.000000000 -0500
@@ -142,7 +142,7 @@
   $form['vote_storylink_url'] = array(
     '#type' => 'textfield',
     '#title' => t('URL'),
-    '#default_value' => $node->vote_storylink[0]['url'],
+    '#default_value' => htmlspecialchars_decode($node->vote_storylink[0]['url']),
     '#maxlength' => 256,
     '#required' => TRUE,
     '#description' => t('The URL/address of the story.'),

Any comments?

Comments

Cromicon’s picture

I tried this but without the function specified in line 145 ( htmlspecialchars_decode) it doesn't work.

Cromicon’s picture

Ok fixed it - I'm using php without that function it seems so here is a fix that works with php4 anyway.

Replace line 145 (as above) from:
'#default_value' => $node->vote_storylink[0]['url'],
to
'#default_value' => htmlspecialchars_decode_php4($node->vote_storylink[0]['url']),

Add a new function at the end of the .module script (line 570 for me)

function htmlspecialchars_decode_php4 ($str) {
    return strtr($str, array_flip(get_html_translation_table(HTML_SPECIALCHARS)));
}

Thank you Presscue for the pointer.

marvil07’s picture

Status: Needs review » Closed (won't fix)

Please take a look to the update on the project page, now 5.x is not-really-maintained.

If you think your question is still applicably to the last recommended version(6.x-2.x) please move the version accordingly and reopen it.