Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12cead3
)
MDL-41672 Fix html2text processing of multiple occurrences of the same URL
author
Alain Corbière
<alain.corbiere@univ-lemans.fr>
Wed, 9 Oct 2013 13:40:38 +0000
(15:40 +0200)
committer
David Mudrák
<david@moodle.com>
Wed, 9 Oct 2013 13:40:38 +0000
(15:40 +0200)
lib/html2text.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/html2text.php
b/lib/html2text.php
index
f01ce8f
..
7b9eb29
100644
(file)
--- a/
lib/html2text.php
+++ b/
lib/html2text.php
@@
-580,9
+580,14
@@
class html2text
}
if (($index = array_search($url, $this->_link_list)) === false) {
+ // Add the link to the list.
$this->_link_list[] = $url;
$index = count($this->_link_list);
}
+ else {
+ // Use the index of the existing link in the list (we enumerate from 1, not from 0).
+ $index++;
+ }
return $display . ' [' . ($index) . ']';
}