removing markdown reference and allow injecting handlers for script elements