From 71c56c3e6e9702ce44d33e6350e6b5425595dcba Mon Sep 17 00:00:00 2001 From: Martin Monperrus Date: Thu, 18 Sep 2014 21:05:16 +0200 Subject: [PATCH] fixes a bug in UTF8 handling in COinS metadata (reported by Wojtek) --- bibtexbrowser.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bibtexbrowser.php b/bibtexbrowser.php index a59c3d9..b0dace5 100755 --- a/bibtexbrowser.php +++ b/bibtexbrowser.php @@ -943,7 +943,10 @@ function latex2html($line) { } /** encodes strings for Z3988 URLs. Note that & are encoded as %26 and not as &. */ -function s3988($s) {return urlencode(utf8_encode($s));} +function s3988($s) { + // first remove the HTML entities (e.g. é) then urlencode them + return urlencode(html_entity_decode($s, ENT_NOQUOTES, ENCODING)); +} /** see BibEntry->formatAuthor($author)