Patent ID: 8667565

Claim:
A method for managing security in conjunction with embedded code in web based services, the method comprising: receiving an input that includes third party content at an embedded code module configured to analyze and restructure the third party content to ensure security employing one or more of: whitelisted attributes, properties and sources; extracting at least one whitelisted attribute from the third party content; validating the at least one extracted attribute by a security analysis based on the extracted at least one whitelisted attribute; if a source of the third party content is a whitelisted source, selecting a template based on the source, else discard the input; generating a secure embedded code based on the third party content in the input employing the selected template at a safety check component by inserting the attributes and properties as arguments into one or more safe HTML tags for storage of the attributes and properties on the one or more safe HTML tags, wherein a safe HTML tag includes one or more of: a “div” tag, an “anchor” tag, and a “span” tag; and employing the one or more safe HTML tags to read attributes at a script component.