用于CSS内联样式转义

时间:2018-04-05 04:44:00

标签: jquery css

在我的项目中,我使用ajax将数据发送到后台,如果有css内联样式,如下所示:

<p><span style="color: rgba(0, 0, 0, 0.84); font-family: medium-content-serif-font, Georgia, Cambria, &quot;Times New Roman&quot;, Times, serif; font-size: 21px; letter-spacing: -0.063px; background-color: rgb(255, 255, 255);">Making myself so vulnerable was terrifying. It was difficult, telling the truth of my body, subjecting myself to the opinions others would inevitably form about my body if they didn’t have them already.</span></p>

这将是禁止的,如果我清除如下的风格:

<p>Making myself so vulnerable was terrifying. It was difficult, telling the truth of my body, subjecting myself to the opinions others would inevitably form about my body if they didn’t have them already.</p>

有效。

那么有哪些方法我只能逃避这种情况的内联样式?谢谢!

0 个答案:

没有答案