Skip to content
Permalink
Browse files

Prohibit parsing of hyperlinks within written HTML code; necessary fo…

…r recursive parsing of WYSIWYG-edited code tags
  • Loading branch information...
chrisgraham committed Jul 29, 2019
1 parent 1536023 commit 21bdf43bba831c29028dd938b375e8d0f8208f1d
Showing with 10 additions and 7 deletions.
  1. +10 −7 sources/comcode_compiler.php
@@ -1598,21 +1598,24 @@ function __comcode_to_tempcode($comcode, $source_member, $as_admin, $wrap_pos, $
($not_white_space) &&
(!$differented);
$in_html_tag = false;
if ($in_semihtml) {
// Make sure not within an HTML tag
if ($apparent_embedded_hyperlink) {
if ($apparent_embedded_hyperlink) {
if ($in_semihtml) {
// Make sure not within an HTML tag, or the written source of one
$until_now = substr($comcode, 0, $pos - 1);
$a = strrpos($until_now, '<');
$b = strrpos($until_now, '>');
$in_html_tag = ($a !== false) && (($b === false) || ($a > $b));
} else {
// Make sure not within the written source of an HTML tag
$until_now = html_entity_decode(substr($comcode, 0, $pos - 1), ENT_QUOTES, get_charset());
$a = strrpos($until_now, '<');
$b = strrpos($until_now, '>');
$in_html_tag = ($a !== false) && (($b === false) || ($a > $b));
}
}
if (
$apparent_embedded_hyperlink &&
(
(!$in_semihtml) ||
(!$in_html_tag)
) &&
(!$in_html_tag) &&
(
($textual_area) ||
(

0 comments on commit 21bdf43

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