diff --git a/bibtexbrowser-test.php b/bibtexbrowser-test.php
index 2d7c72d..e69c2a4 100755
--- a/bibtexbrowser-test.php
+++ b/bibtexbrowser-test.php
@@ -527,7 +527,7 @@ class BTBTest extends PHPUnit_Framework_TestCase {
function test_homepage_link() {
bibtexbrowser_configure('USE_COMMA_AS_NAME_SEPARATOR_IN_OUTPUT', false);
bibtexbrowser_configure('USE_FIRST_THEN_LAST', false);
- $bibtex = "@string{hp_MartinMonperrus={http://www.monperrus.net/martin},hp_FooAcé={http://example.net/}},@article{aKey61,title={An article Book},author = {Martin Monperrus and Foo Acé and Monperrus, Martin}}\n";
+ $bibtex = "@string{hp_MartinMonperrus={http://www.monperrus.net/~martin},hp_FooAcé={http://example.net/}},@article{aKey61,title={An article Book},author = {Martin Monperrus and Foo Acé and Monperrus, Martin}}\n";
$test_data = fopen('php://memory','x+');
fwrite($test_data, $bibtex);
fseek($test_data,0);
@@ -535,9 +535,9 @@ class BTBTest extends PHPUnit_Framework_TestCase {
$db->update_internal("inline", $test_data);
$entry = $db->getEntryByKey('aKey61');
$authors = $entry->getFormattedAuthorsArray();
- $this->assertEquals('Martin Monperrus', $authors[0]);
+ $this->assertEquals('Martin Monperrus', $authors[0]);
$this->assertEquals('Foo Acé', $authors[1]);
- $this->assertEquals('Monperrus, Martin', $authors[2]);
+ $this->assertEquals('Monperrus, Martin', $authors[2]);
}
function test_author_index() {
diff --git a/bibtexbrowser.php b/bibtexbrowser.php
index f37fe11..d98523d 100755
--- a/bibtexbrowser.php
+++ b/bibtexbrowser.php
@@ -1226,7 +1226,9 @@ class BibEntry {
// we assume that "comment" is never latex code
// but instead could contain HTML code (with links using the character "~" for example)
// so "comment" is not transformed too
- if ($name!='url' && $name!='comment') {
+ if ($name!='url' && $name!='comment'
+ && !preg_match('/^hp_/',$name) // homepage links should not be transformed with latex2html
+ ) {
$value = $this->transformValue($value);
// 4. transform existing encoded character in the new format