这实际上取决于您使用的 Wiki 语法,因为有几种不同的语法。 显然,wiki 软件在某处具有此功能; 如果您找不到可以为您执行此操作的软件包,您可以开始在 wiki 软件中查找相关代码。
This really depends on the Wiki syntax you're using as there are several different ones. Obviously the wiki software has this functionality somewhere; if you can't find a software package that does this for you, you could start looking for the relevant code in your wiki software.
This page is a compilation of links, descriptions, and status reports of the various alternative MediaWiki parsers — that is, programs and projects, other than MediaWiki itself, which are able or intended to translate MediaWiki's text markup syntax into something else.
It's not really a simple problem, because if you're going to display things back to the user, you'll need to also sanitise the input to ensure you don't create any cross site scripting vulnerabilities.
That said, you could probably do something pretty simple as you describe most easily with a regular expression replacement.
发布评论
评论(3)
这实际上取决于您使用的 Wiki 语法,因为有几种不同的语法。 显然,wiki 软件在某处具有此功能; 如果您找不到可以为您执行此操作的软件包,您可以开始在 wiki 软件中查找相关代码。
This really depends on the Wiki syntax you're using as there are several different ones. Obviously the wiki software has this functionality somewhere; if you can't find a software package that does this for you, you could start looking for the relevant code in your wiki software.
也许这就是您所需要的。
Maybe this is what you need.
这实际上并不是一个简单的问题,因为如果您要将内容显示给用户,您还需要清理输入以确保您不会创建任何 跨站脚本漏洞。
也就是说,您可能可以做一些非常简单的事情,正如您通过正则表达式替换最容易描述的那样。
例如
It's not really a simple problem, because if you're going to display things back to the user, you'll need to also sanitise the input to ensure you don't create any cross site scripting vulnerabilities.
That said, you could probably do something pretty simple as you describe most easily with a regular expression replacement.
For example