I have the following problem - from the server side I get a string like 'hoschi"brother'.
I want to put this string into a <input value"MYSTRING" />
. This results in something like <input value"hoschi" brother" />
which obviously does not work.
Is there a workarounds for this?
Does escaping the "
character with "
work within the value tag?
The HTML <q> tag defines a short quotation. Browsers normally insert quotation marks around the quotation.
For printing double quotes(” “), using print() in C we make use of ” \” ” backslash followed by double quote format specifier.
No, there is not. The double quote ( " ) has special meaning inside a HTML attribute. If you want to put it into an attribute value, you must (this is not a true must but a good rule of thumb. It's a must if you use attributes delimited by double-quotes as you do in your question) write it as its entity " .
Yes, using "
works:
<input type="text" name="last_name" value=""My quote!"" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With