echo '<button class="modalInput" title="Is there an error in this question, report it here." rel="#prompt" onClick="params('.$item->catid.','.$item->id.',"'.$item->quote.'","'.$item->author.'");">';
Now - This Works perfectly fine - If $item->quote and $item->author doesnt hold any values like:
My uncle's house Who said "Ich bin ein Berliner"?
Then the params string will be pretty messed up...
<button class="modalInput" title="Is there an error in this question, report it here." rel="#prompt" onClick="params(21,12,"Who said "ich bin ein Berliner"","George Bush");">
How can I fix this?
Still dont Work
echo '<button class="modalInput" title="Is there an error in this question, report it here." rel="#prompt" onClick="params('.$item->catid.','.$item->id.',\''.htmlspecialchars($item->quote).'\',\''.(string) htmlspecialchars($item->author).'\');">';
becomes
<button class="modalInput" title="Is there an error in this question, report it here." rel="#prompt" onClick="params(29,29,'In a FOX TV show, what did 'The OC' stand for','Orange County');">