Links are cut of at accented characters

Tommy Sundstrom - April 1, 2009 - 11:55
Project:Delicious
Version:6.x-1.2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

If a headline from Delicious contains an accented character (at least one of the Swedish åäö, but I suspect this bites in other cases also) it will be cut off just before that character.

For example, if this page is saved in Delicious: "Varumärket viktig trafikkälla" - http://www.e-handelstrender.se/2009/03/varumarket-viktig-trafikkalla/ it will show as "Varum"

#1

Tommy Sundstrom - April 2, 2009 - 22:54
Status:active» needs review

In delicious.inc, class _delicious_post_parser, function start_element there is this line:

$desc = db_escape_string(utf8_decode($attrs["DESCRIPTION"]));

that produces strange decodings. I suspect that the text in $attrs["DESCRIPTION"]) is already decoded once. Whatever the cause, removing the decoding like this:

$desc = db_escape_string($attrs["DESCRIPTION"]);

solves the problem with the cut off.

(I'm sorry, but I don't know how to make a patch.)

#2

Tommy Sundstrom - September 28, 2009 - 13:14

The code that is changed in the workaround described in comment #1 has moved into delicious.module. Other than that, it still can be fixed the same way.

 
 

Drupal is a registered trademark of Dries Buytaert.