Write a message that the message should be paid attention to (Applicable PHP and ASP)

xiaoxiao2021-03-06  83

The following is the experience that I have accumulated when I wrote a message:

First, prevent formation of forms

Add in the corresponding table label

Style = "Table-Layout: fixed; Word-Break: Break-all"

Second, shield HTML code

Replace "<" and ">" in the message content into & lt; and & gt;

Third, replace hard

That is, reserves the style when signing the message writes, which also needs to be replaced.

Replace CHR (13) in ASP

Replace "/ N" in PHP

Note: If you want to combine the mask HTML code, you must replace the second point of the second point.

Everyone else has any other experience, please keep it!

转载请注明原文地址:https://www.9cbs.com/read-95363.html

New Post(0)