开发者

Online or offline text to html entities converter

开发者 https://www.devze.com 2023-01-27 19:45 出处:网络
Does anyone know of any online or offline software that will take, say, a paragraph of text with quotes and other characters in it and convert it to html entities ?

Does anyone know of any online or offline software that will take, say, a paragraph of text with quotes and other characters in it and convert it to html entities ?

I am not looking for the normal alphabetic characters to be converted, just the quotes and dashes etc.

Reason I ask is that we have a copywriting department who insist on using Word for writing c开发者_如何学Copy for websites but copying and pasting this into a site whilst having to find the strange characters is time consuming and tedious.


PHP functions htmlspecialchars makes this easy. You can easily make a small html form who posts to a php script that write out the result.

PHP:

echo htmlspecialchars($_POST['input']);

HTML:

<form method="post">
<textarea name="input"></textarea>
</form>

http://php.net/htmlspecialchars

0

精彩评论

暂无评论...
验证码 换一张
取 消