Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
wp_editor 添加转义字符,例如:
"/
for example: <p style=\"text-align:center\">text</p> I want to make: <p style="text-align:center">text</p>
谢谢。
你需要使用 wordpress 消毒:
<?php wp_kses_post( $data ); ?>
http://codex.wordpress.org/Function_Reference/wp_kses_post
找到我的答案:)
str_replace(array('\"'), '"', "<p style=\"text-align:center\">text</p>")