Home  >  Article  >  Backend Development  >  javascript - Baidu (ueditor) editor outputs garbled characters?

javascript - Baidu (ueditor) editor outputs garbled characters?

WBOY
WBOYOriginal
2016-08-04 09:19:171456browse
<p class="question fmt" data-id="1010000006146995"> </p> <p><img data-src="/img/bVzXgN" alt="javascript - Baidu (ueditor) editor outputs garbled characters?" ></p> <p><img data-src="/img/bVzXgQ" alt="javascript - Baidu (ueditor) editor outputs garbled characters?" ></p> <p>As shown in the picture: the first picture is the preview effect, and the second picture is the code</p> <p>As you can see from the picture, I output the same variable in the page, but in the web page effect, the textarea above is normal, only the ueditor below is garbled. What is going on? There is no garbled code in the database, and there is no problem with the encoding. I searched online and couldn’t find the answer. Please ask someone to direct me. Thank you</p> <h2>Reply content:</h2> <p><img data-src="/img/bVzXgN" alt="javascript - Baidu (ueditor) editor outputs garbled characters?" ></p> <p><img data-src="/img/bVzXgQ" alt="javascript - Baidu (ueditor) editor outputs garbled characters?" ></p> <p>As shown in the picture: the first picture is the preview effect, and the second picture is the code</p> <p>As you can see from the picture, I output the same variable in the page, but in the web page effect, the textarea above is normal, only the ueditor below is garbled. What is going on? There is no garbled code in the database, and there is no problem with the encoding. I searched online and couldn’t find the answer. Please ask someone to direct me. Thank you</p> <p class="answer fmt" data-id="1020000006147148"> </p> <p>This is not garbled code, this is the materialization of your <code>html</code> tag. </p> <p class="answer fmt" data-id="1020000006147189"> </p> <p>UEditor will escape characters such as <code><</code>, <code>></code> in order to prevent XSS attacks. </p>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn