防止文本php中的html插入

Adi*_*kla 1 html php

当我输入文本时我有一个问题我可以用文本输入html.例如"我正在输入文本".现在,此链接在提交表单时显示为链接.有关如何防止这种情况的任何想法?

I am entering text <a href="xyz.com">Go to my site </a>. This is the input so when i output the data it comes out as I am entering text **Go to my site** with the hyperlink. 
Run Code Online (Sandbox Code Playgroud)

Gut*_*tsy 6

把字符串放入htmlspecialchars()strip_tags().

并且,因为我觉得为其他目的清洁琴弦将是下一个问题,我应该提出这个:最终的清洁/安全功能