PluginProbe
VikBooking Hotel Booking Engine & PMS / 1.8.16
VikBooking Hotel Booking Engine & PMS v1.8.16
1.8.16 1.8.15 1.8.14 1.8.13 1.8.12 1.8.11 1.8.10 1.8.9 1.8.6 1.8.7 1.8.8 trunk 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 1.6.5 1.6.6 1.6.7 1.6.8 1.6.9 1.7.0 1.7.1 1.7.2 All 37 releases
← All changes | admin/helpers/conditional_rules.php +3 -2 1.8.7 → 1.8.16 View file →
@@ -486,13 +486,14 @@
486 486 /**
487 487 * Make sure any src/href attribute does not contain relative URLs.
488 488 *
489 489 * @since 1.15 (J) - 1.5.0 (WP)
490 + * @since 1.18.8 (J) - 1.8.8 (WP) ignore attributes containing a special tag.
490 491 */
491 492 $cond_texts[$token]['msg'] = preg_replace_callback("/\s*(src|href)=([\"'])(.*?)[\"']/i", function($match) {
492 493 // check if the URL starts with the base domain
493 - if (stripos($match[3], JUri::root()) !== 0 && !preg_match("/^(https?:\/\/|www\.)/i", $match[3])) {
494 - // prepend base domain to URL
494 + if (stripos($match[3], JUri::root()) !== 0 && !preg_match("/^(https?:\/\/|www\.|{)/i", $match[3])) {
495 + // safely prepend base domain to URL
495 496 $match[0] = ' ' . $match[1] . '=' . $match[2] . JUri::root() . $match[3] . $match[2];
496 497 }
497 498 return $match[0];
498 499 }, $cond_texts[$token]['msg']);