For a blog I want to add Google’s +1 buttons inline on the end of the body text. To do this I want the code below to appear just before the very last </p>-tag. Like this:
<g:plusone size="small"></g:plusone>The body will be full HTML, so there can be multiple paragraphs. I looked at the Find & Replace plugins, but none of them seem to have an option to replace only the very last instance of </p>. Backspacing 4 chars could also solve the issue.
What would be the best way to do this? With php str_replace(), all quotes remain in the {body}-text, so it gets me syntax errors (a tip to prevent that from happening would help too).