--[[
    Example: output filter that rewrites vulnerable JS
]]--
function output_filter(r)
    while bucket do
        local output = bucket:gsub("if (h) jQuery(\"a[href*=\" + h + \"]\").click()", "if (h) jQuery(\"body\").find(\"a[href*=\" + h + \"]\"")
        coroutine.yield(output)
    end
end