0

I have a buggy situation that i can't figure out how to solve: i tried to store in the test db some sequential double quotation marks (""""""""). Now, when i print them as value of an input type="text" field, what i get is:

<input type="hidden" """"""""="" value="" name="it">

Data in the db are passed through sanitize_text_field(stripslashes()) (first one is a wordpress core function) and so does not contain slashes at all. How can i fix this? Am i storing data in a wrong way?

Mariano
  • 221
  • 1
  • 4
  • 14
  • That documentation makes no note about quotations. Try running it through `htmlspecialchars`. Also is that a dev console output? Because in the case of html bugs, the rarely exactly the same as the source. – Flosculus Dec 01 '14 at 15:59
  • 1
    This may be of help http://wordpress.stackexchange.com/a/114354/17187 – Nabil Kadimi Dec 01 '14 at 16:20
  • thanks @Nabil Kadimi, `esc_attr()` solved the bug. @Flosculus i now that function doesn't say anything about quotations, it was just to give a complete scenario of how the script was working... – Mariano Dec 01 '14 at 17:28

0 Answers0