preg_replace to get rid of those pesky line break characters.
Particularly for Google Maps bubble’s which take an aversion to non-ASCII chars so as to stop a map rendering altogether.
Non-ACSII characters
This piece of code should be applied when generating a Google Map using any quantity of user generated material.
function removelinebreaks($string)
{
return preg_replace(‘/[\r\n\t]/e’, ‘ ‘, $string);
}
Also make sure you trim your bubbles, and if you’re particularly nervous check the htmlentities and CDATA[ declarations also.
Makes for happier bubbles :)
Related Reading

This is a short guide to installing flexible solar panels to a narrowboat. How long do flexible solar panels last for? No doubt, less long...

Top 14 tips for Amazon Flex drivers (UK). Map of Amazon Flex depots. Amazon Flex contract for drivers.

If you’re planning a trip, or maybe living there as an expat, these are the apps you’re going to want to have installed to your...

Background So, I’ve been running this site for around 1 month now without hitches, the homepage sorted and the page structure hieracy as it should...

A hiking trip for Mount Rinjani in Lombok