Escape prev next cache

https://issues.civicrm.org/jira/browse/CRM-14676