search

Home  >  Q&A  >  body text

The problem with old() function in laravel is that the value is an entity

For example

<input type="text" value="{{old('foo')}}">

At this time, if you enter an entity like  , the verification will not pass after submission. Once the page is refreshed, there will be spaces in the input and it will no longer be  . How can I solve this problem? What about this problem?

阿神阿神2747 days ago323

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-05-16 16:52:55

    value="{{ htmlspecialchars(old('foo')) }}"

    reply
    0
  • Cancelreply