Fixing issue with $ in page content

Adding a function as the second parameter to string.replace
when injecting the body content into layouts.

Fixes #286 so $ can be used inside pages.