Joseph Sliker;11040065 wrote:The problem is dealing with all of those things that non-HTML literate folks would enter into textarea fields (ie. typical [enter] carriage returns, quotation marks, apostrophes, commas...)
Why (and/or what) is there a problem with "dealing" with that data?
Why would the level of literacy with HTML have any relation to the type of data entered into the field? For example, I quite regularly (especially right now as I type this message) use all four of the example types of data you mentioned; are you saying that I am one of those pesky "non-HTML literate folks" (whatever that means)? 🙁
Joseph Sliker;11040065 wrote:all that good stuff that might get turned into alternate characters, or cause an entry to be parsed/saved incorrectly, etc. etc.
Why do you fear that any of the above (including whatever the ellipses represents) will get turned into "alternate characters" ? Who would do that translation, and why don't you have control over it? Why doesn't your normal method of preparing data for parsing/saving work when such values are used?
Joseph Sliker;11040065 wrote:What is the general process for storing such "prose" type entries into database (MySQL) fields, displaying it as the submitter intended (ie. paragraphs broken in the right places, no lost text because of apostrophes, AND if the user goes back to re-open the record for future edits, seeing the text returned to the online form/editor just as he/she originally entered it?
I'm personally a fan of never losing the integrity of the original data itself. In other words, I would store it in your SQL database exactly as it was given to you - line break characters and all. If it's a lossless translation, and a case could be made that the CPU utilization would be better suited to store the data in a "presentation" format (e.g. store "<br>" rather than a line break), then sure, I might be agreeable with that, too.
Assuming no transformations were done on the data when you stored it... when you go to retrieve that data, you then have to think about how you're going to present that. Are you plopping the value in between <textarea>..</textarea> HTML tags? If so, you don't wan't to convert line breaks.
Either way, you probably do want to ensure at least '<', '>', and '&' get translated into the appropriate HTML entities (e.g. '<', '>', and '&' respectively) to ensure your HTML markup doesn't get broken. You might need to worry about quotes (single and/or double) if you're outputting the data inside of attribute's value in an HTML entity. In other words, you'd probably want to use [man]htmlspecialchars/man (although some may go the extra mile and use [man]htmlentities/man instead).