No need to compile anything: you can just update to a newer libwebkitgtk
- then Geary (and other applications like e.g. the WiFi login window) will use that instead of the old one. I think the issue was fixed in 2.4.9, but the version currently available in the repository is 2.4.8.
sudo add-apt-repository ppa:webkit-team/ppa
sudo sed -i s/trusty/vivid/g /etc/apt/sources.list.d/webkit-team-ppa-trusty.list
sudo apt-get update
sudo apt-get install libwebkitgtk-1.0-0 libwebkitgtk-3.0-0
Don't blame me if that breaks things - I destroyed a lot while finding the solution!
Edit: fixed a lot of wrong things about this :D