External Links - Version 6.3.1

Version Description

  • Fix bug that crept back in with embedded image with a class while the link itself had no class attribute
Download this release

Release Info

Developer Mike_Koepke
Plugin Icon wp plugin External Links
Version 6.3.1
Comparing to
See all releases

Code changes from version 6.3 to 6.3.1

Files changed (2) hide show
  1. readme.txt +4 -0
  2. sem-external-links.php +8 -2
readme.txt CHANGED
@@ -60,6 +60,10 @@ The plugin supports a non-started rel="follow" attribute on links to override th
60
 
61
  == Change Log ==
62
 
 
 
 
 
63
  = 6.3 =
64
 
65
  - Changed link detection to err on the side of a link being local rather than external to avoid false positives.
60
 
61
  == Change Log ==
62
 
63
+ = 6.3.1 =
64
+
65
+ - Fix bug that crept back in with embedded image with a class while the link itself had no class attribute
66
+
67
  = 6.3 =
68
 
69
  - Changed link detection to err on the side of a link being local rather than external to avoid false positives.
sem-external-links.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: External Links
4
  Plugin URI: http://www.semiologic.com/software/external-links/
5
  Description: Marks outbound links as such, with various effects that are configurable under <a href="options-general.php?page=external-links">Settings / External Links</a>.
6
- Version: 6.3
7
  Author: Denis de Bernardy & Mike Koepke
8
  Author URI: https://www.semiologic.com
9
  Text Domain: external-links
@@ -437,8 +437,14 @@ class sem_external_links {
437
  $attr_value = false;
438
  $quote = false; // quotes to wrap attribute values
439
 
 
 
 
 
 
 
440
  $re = '/' . preg_quote($attr_name) . '=([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)/is';
441
- if (preg_match($re, $html, $matches)
442
  ) {
443
  // two possible ways to get existing attributes
444
  $attr_value = $matches[2];
3
  Plugin Name: External Links
4
  Plugin URI: http://www.semiologic.com/software/external-links/
5
  Description: Marks outbound links as such, with various effects that are configurable under <a href="options-general.php?page=external-links">Settings / External Links</a>.
6
+ Version: 6.3.1
7
  Author: Denis de Bernardy & Mike Koepke
8
  Author URI: https://www.semiologic.com
9
  Text Domain: external-links
437
  $attr_value = false;
438
  $quote = false; // quotes to wrap attribute values
439
 
440
+ preg_match('/(<a.*>)/iU', $html, $match);
441
+
442
+ $link_str = $match[1];
443
+ if ($link_str == "")
444
+ return $html;
445
+
446
  $re = '/' . preg_quote($attr_name) . '=([\'"])?((?(1).+?|[^\s>]+))(?(1)\1)/is';
447
+ if (preg_match($re, $link_str, $matches)
448
  ) {
449
  // two possible ways to get existing attributes
450
  $attr_value = $matches[2];