Pgehres has uploaded a new change for review.
https://gerrit.wikimedia.org/r/55292
Change subject: A few little modifications to the original html2text for our
use cases
......................................................................
A few little modifications to the original html2text for our use cases
Change-Id: I50ed561270348143df0ed661d6b131f191bd5496
---
M sites/all/modules/thank_you/html2text.php
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/civicrm
refs/changes/92/55292/1
diff --git a/sites/all/modules/thank_you/html2text.php
b/sites/all/modules/thank_you/html2text.php
index ed46373..4460254 100644
--- a/sites/all/modules/thank_you/html2text.php
+++ b/sites/all/modules/thank_you/html2text.php
@@ -430,16 +430,16 @@
$text = preg_replace("/\n\s+\n/", "\n\n", $text);
$text = preg_replace("/[\n]{3,}/", "\n\n", $text);
- // Add link list
- if ( !empty($this->_link_list) ) {
- $text .= "\n\nLinks:\n------\n" . $this->_link_list;
- }
-
// Wrap the text to a readable format
// for PHP versions >= 4.0.2. Default width is 75
// If width is 0 or less, don't wrap the text.
if ( $this->width > 0 ) {
$text = wordwrap($text, $this->width);
+ }
+
+ // Add link list
+ if ( !empty($this->_link_list) ) {
+ $text .= "\n\nLinks:\n------\n" . $this->_link_list;
}
$this->text = $text;
@@ -474,7 +474,7 @@
} else {
$this->_link_count++;
$this->_link_list .= "[" . $this->_link_count . "] " .
$this->url;
- if ( substr($link, 0, 1) != '/' ) {
+ if ( substr($link, 0, 1) != '/' && substr($link, 0, 2)
!= '{{') {
$this->_link_list .= '/';
}
$this->_link_list .= "$link\n";
--
To view, visit https://gerrit.wikimedia.org/r/55292
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I50ed561270348143df0ed661d6b131f191bd5496
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/civicrm
Gerrit-Branch: master
Gerrit-Owner: Pgehres <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits