Skip sanitization for videos in html5lib
        Posted  
        
            by 
                pug
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by pug
        
        
        
        Published on 2010-06-01T15:39:22Z
        Indexed on 
            2011/01/16
            14:53 UTC
        
        
        Read the original article
        Hit count: 507
        
I am using a wmd-editor in django, much like this one in which I am typing. I would like to allow the users to embed videos in it. For that I am using the Markdown video extension here. The problem is that I am also sanitizing user input using html5lib sanitization and it doesn't allow object tags which are required to embed the videos.
One solution could be to check the input for urls of well-known video sites and skip the sanitization in those cases. Is there a better solution?
© Stack Overflow or respective owner