1. A method for modifying the behavior of an application, the method comprising: receiving an electronic document, the electronic document comprising publication data having user data, page data, and function modifying code, wherein: the user data has been authored by an entity different than an entity that authored the page data, and includes at least one function call of a programming language and having a security vulnerability; and the function modifying code redefines a standard function definition of the function call based on a declaration that overrides the standard function definition; rendering the received electronic document, wherein the rendering of the received electronic document causes execution of the function call; executing the function modifying code instead of the standard function definition code based on the rendering of the received electronic document; and displaying the user data based on the rendering of the received electronic document.