Commit ecfc431f authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4706 (Symbol parameters need to be entity-decoded in semihtml markup)

parent 13444e79
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -1033,7 +1033,7 @@ function __comcode_to_tempcode($comcode, $source_member, $as_admin, $wrap_pos, $
                                                    $ret->attach(static_evaluate_tempcode(comcode_lang_string($temp_lang_string))); // Recreate as a Comcode language string
                                                }
                                            }
                                        } else {
                                        } else { // Probably a symbol
                                            $p_len = $pos;
                                            $balance = 1;
                                            while (($p_len < $len) && ($balance != 0)) {
@@ -1046,7 +1046,11 @@ function __comcode_to_tempcode($comcode, $source_member, $as_admin, $wrap_pos, $
                                            }
                                            $ret = new Tempcode();
                                            $less_pos = $pos - 1;
                                            $ret->parse_from($comcode, $less_pos, $p_len);
                                            $_variable_comcode = substr($comcode, $less_pos, $p_len - $less_pos);
                                            if ($in_semihtml) {
                                                $_variable_comcode = html_entity_decode($_variable_comcode, ENT_QUOTES, get_charset());
                                            }
                                            $ret->parse_from($_variable_comcode, 0, strlen($_variable_comcode), true);
                                            $pos = $p_len;

                                            /*if (!$in_html && !$in_semihtml) {     Actually, no, we must explicitly escape symbols in Comcode (except when there's a pre-Tempcode-pass of that Comcode / inside tag attributes / inside non-textual areas)
+1 −1
Original line number Diff line number Diff line
@@ -1463,7 +1463,7 @@ class Tempcode
     * @param  integer $pos Start position of input string
     * @param  integer $len End position of input string
     */
    public function parse_from(&$code, &$pos, &$len)
    public function parse_from($code, $pos, $len)
    {
        $this->cached_output = null;
        require_code('tempcode_compiler');