Use of double quotes in a 'input type=“text”' value wont work, string stops at double-quote !

后端 未结 4 1201
一生所求
一生所求 2021-02-04 19:14

How can I make it possible for users to use the \'\"\' (double quote) inside a textfield...

Whenever I do use double-quote in the field (the value) then when receiving t

4条回答
  •  你的背包
    2021-02-04 19:25

    The reason it isn't working when you're outputting it into the input is because the value is being truncated at the quote. You'll need to use htmlspecialchars() on the output.

提交回复
热议问题