Hi I need to search for a
string "<script" in
java Tag class. I have used following logic. urlAsString is the String in which i am searching for the "<script" string.
if(urlAsString.matches([[^ ] ]*<[ ]*(?i)script[[^ ] ]*))
{
urlAsString = "Page contains javascript";
}
In short, i dont want to allow "<script" in urlAsString except it is used as "<script>parent.close();</script>". If it is used in this manner, then i need to allow it otherwise "<script" should not be there.
can anyone guide me on this?