Can anyone suggest a decent regex to sanitise an input field which should be Markdown text? I presently have
$transcript = preg_replace("/[^A-Za-z0-9_,.:;\n\- ]/", '', $transcript);
but I bet I haven’t got all allowed punctuation marks and I can’t help feeling there is a better way. Thanks
Would it not be easier to convert to HTML first, then sanitize that?
Gandalf
3
Thanks @fretburner maybe it would. I’ll have to think on that…
system
Closed
4
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.