Click here to Skip to main content
15,886,776 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
A web application acts like a repository of various cloud documents( i.e documents from OneDrive, Google Drive, Dropbox etc). The users share the embed html of that document. This approach makes it easy to integrate various cloud storage platform at one place without worries of learning or implementation of their respective APIs. The only problem remains is validation of those embed html provided by users. Since the content is in iframe the users can provide any url. I somehow can restrict and check that those url provided are among the pattern of respective cloud storage platform. Like for OneDrive documents the url will begin or have "https://onedrive.live.com/embedxxxxxx..." . Similarly for Google Drive or other. Now I just need to check or verify that those url works perfect or if having some error the users are prompted the very moment. If those url are correct they would successfully load the document in the iframe and if there is some error as I intentionally tried as an experiment by changing some characters in ids in url the iframe is displayed blank or some error message. So how can I make sure the embed html is valid when provided by users?
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900