Note to anyone upgrading from 1.3.1: Since version 1.3.2 the addon now uses the common thread_view-template. If some other addon inserts bad markup into that view, the AMP pages will be invalid until those are fixed.
Fixed the addon to strip out badly inserted scripts (single-quotes...)
@Sperber noticed admin spammed about errors due to a specific template using XF2.2-related functions.
This version includes a specific template for XF2.1