Apostrophe not working with ImageMagick
Posted: 2014-06-24T13:23:35-07:00
I have a php page with a form where a user can enter text for a list. These fields insert into a MySQL database using the mysqli_real_escape_string method. I've checked the database and it shows up correctly as: "eric's test" so I know it is inserted into the DB with the apostrophe.
Then I do a SELECT statement and pull the data (in a loop to build a list of text) and use label: to create an image.
start loop code....
$bullettitle .= $row_bullets_element['bullettitle']."\n"; <---- I added the \n to cause line breaks for a list effect.
end loop code....
The below only works if the $bullettitle doesn't have an apostrophe such as the string: eric's test
exec("convert -interline-spacing {$previewbulletsfontspacing} -background none -size {$previewbulletswidth}x -fill '{$fontcolorbullets}' -font Arial -pointsize {$previewbulletsfontsize} label:'{$bullettitle}' {$previewbulletsfilenamepath}");
I've tried backslashing like this: eric\'s test but it doesn't even render. How does this work? I've tried this for several days and no test comes thru. Thank you.
Then I do a SELECT statement and pull the data (in a loop to build a list of text) and use label: to create an image.
start loop code....
$bullettitle .= $row_bullets_element['bullettitle']."\n"; <---- I added the \n to cause line breaks for a list effect.
end loop code....
The below only works if the $bullettitle doesn't have an apostrophe such as the string: eric's test
exec("convert -interline-spacing {$previewbulletsfontspacing} -background none -size {$previewbulletswidth}x -fill '{$fontcolorbullets}' -font Arial -pointsize {$previewbulletsfontsize} label:'{$bullettitle}' {$previewbulletsfilenamepath}");
I've tried backslashing like this: eric\'s test but it doesn't even render. How does this work? I've tried this for several days and no test comes thru. Thank you.