Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: soundasleep/html2text
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: mailpoet/html2text
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 4 commits
  • 1 file changed
  • 3 contributors

Commits on Apr 8, 2018

  1. Copy the full SHA
    83053f5 View commit details
  2. Copy the full SHA
    95c5f26 View commit details

Commits on Apr 24, 2019

  1. Revert "Prevents URLs from being automatically encoded"

    This reverts commit 95c5f26.
    
    [MAILPOET-1988]
    pavel-mailpoet committed Apr 24, 2019
    Copy the full SHA
    81192f1 View commit details
  2. Merge pull request #1 from mailpoet/remove-urldecode

    Revert "Prevents URLs from being automatically encoded"
    JanJakes authored Apr 24, 2019

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d907c8f View commit details
Showing with 4 additions and 10 deletions.
  1. +4 −10 src/Html2Text.php
14 changes: 4 additions & 10 deletions src/Html2Text.php
Original file line number Diff line number Diff line change
@@ -397,17 +397,11 @@ static function iterateOverNode($node, $prevName = null, $in_pre = false, $is_of
$output = "[$output]";
}
} else {
if ($href == $output || $href == "mailto:$output" || $href == "http://$output" || $href == "https://$output") {
// link to the same address: just use link
$output;
if ($output) {
$output = "[$output]($href)";
} else {
// replace it
if ($output) {
$output = "[$output]($href)";
} else {
// empty string
$output = $href;
}
// empty string
$output = $href;
}
}