M
M
Msklf2017-10-26 00:34:13
Zend Framework
Msklf, 2017-10-26 00:34:13

How to escape zf1 output?

How to escape the string output so that js does not work in the search string? Zend Framework1 (v. 1.12.3)

<div id="search-box">
            <input type="text" placeholder="<?php echo $this->languageText('TEXT_SEARCH_OUR_SITE',"Search Our Site"); ?>" name="query" id="query" />
            <div class="search-box-bk"></div>
        </div>

I tried this, but it didn't work
placeholder="<?php echo $this->escape($this->languageText('TEXT_SEARCH_OUR_SITE',"Search Our Site"));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
Cat Anton, 2017-10-30
@27cm

<?php echo $this->escape() ?>should have worked.
We need a specific example on which escaping does not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question