Skip to content
Permalink
Browse files

Fix WYSIWYG-URLs that are page-links

  • Loading branch information...
chrisgraham committed Jul 29, 2019
1 parent 21bdf43 commit d7271a51a31d0bf88fbfd7948d3d89dd4f8bdf33
Showing with 2 additions and 2 deletions.
  1. +1 −1 sources/comcode_from_html.php
  2. +1 −1 sources/urls2.php
@@ -105,7 +105,7 @@ function _a_tag_link_fixup($matches)
{
$referer = post_param_string('http_referer', cms_srv('HTTP_REFERER'));
$caller_url = looks_like_url($referer) ? preg_replace('#/[^/]*$#', '', $referer) : get_base_url();
$ret = '<a ' . $matches[1] . 'href="' . qualify_url($matches[2], $caller_url) . '"' . $matches[3] . '>';
$ret = '<a ' . $matches[1] . 'href="' . escape_html(qualify_url(html_entity_decode($matches[2], ENT_QUOTES, get_charset()), $caller_url)) . '"' . $matches[3] . '>';
return $ret;
}
@@ -278,7 +278,7 @@ function _qualify_url($url, $url_base, $base_is_full_url)
require_code('obfuscate');
$mto = mailto_obfuscated();
if (($url != '') && ($url[0] != '#') && (substr($url, 0, 5) != 'data:') && (substr($url, 0, 7) != 'mailto:') && (substr($url, 0, strlen($mto)) != $mto)) {
if (($url != '') && ($url[0] != '{') && ($url[0] != '#') && (substr($url, 0, 5) != 'data:') && (substr($url, 0, 7) != 'mailto:') && (substr($url, 0, strlen($mto)) != $mto)) {
if (url_is_local($url)) {
if ($url[0] == '/') {
$parsed = @parse_url($url_base);

0 comments on commit d7271a5

Please sign in to comment.
You can’t perform that action at this time.