GithubHelp home page GithubHelp logo

Comments (6)

JaxsonWang avatar JaxsonWang commented on August 11, 2024

@giuem dalao

from wp-editor.md.

giuem avatar giuem commented on August 11, 2024

最近在忙期末项目,还有期末考🌚

我下午看一下……

from wp-editor.md.

giuem avatar giuem commented on August 11, 2024

问题出在 strip_tags 这个函数

https://secure.php.net/manual/zh/function.strip-tags.php

Note:
HTML 注释和 PHP 标签也会被去除。这里是硬编码处理的,所以无法通过 allowable_tags 参数进行改变。

解决办法可能会有点脏, 比如先把 <!--more--> 替换成 {!--more--} 之类的,然后过滤完 xss 再替换回去

from wp-editor.md.

JaxsonWang avatar JaxsonWang commented on August 11, 2024

你这个说得我好迷糊...

from wp-editor.md.

giuem avatar giuem commented on August 11, 2024

https://github.com/JaxsonWang/WP-Editor.MD/blob/master/Jetpack/markdown/xsshtml.class.php#L88 这里就已经把 <!--more--> 过滤了,因为这是 HTML 注释。

所以你只要在这句之前把 <!--more--> 替换成 {!--more--},然后在 getHtml() 的时候把 {!--more--} 换回 <!--more-->

from wp-editor.md.

JaxsonWang avatar JaxsonWang commented on August 11, 2024

解决了,谢dalao

from wp-editor.md.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.