cleanup code and data urls in compendia templates