Using single and double quotes in <form> text fields



Let's say the following line is in a text file:

he said, "This is an 'A'."

When the line is read into a <form> text field for changing, the single and double quotes are not maintained. In fact the phrase is truncated. Is there a way to read text into the value of a <form> text field and maintain the single and double quotes if they are there?
I think you can use the addslashes() function. You can find a detailed description of it on I believe it adds the /' and /" to your quotes so it preserves the string as you wrote it.
addslashes does not work... however, using str_replace to replace double quotes with " does work...

Is there a better way?