How to remove [removed] tags from an HTML page using C#?

前端 未结 5 1123
盖世英雄少女心
盖世英雄少女心 2020-12-15 22:29

    
        
        

        
5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-15 22:49

    This may seem like a strange solution.

    If you don't want to use any third party library to do it and don't need to actually remove the script code, just kind of disable it, you could do this:

    html = Regex.Replace(html , @"]*>", "");
    

    This creates an HTML comment out of script tags.

提交回复
热议问题