javascript - Allow only html break tag with regex -


i have following preg_match statment in php:

if(!preg_match("/^[a-za-z\d '-^\",.!?]+$/", $cont)){      //do  } 

in addition want allow br tags no other html tags, how can that?

also done same way js?

var ccheck = /^[0-9a-za-z '-^\",.!?]+$/;  if(!cont.match(ccheck)){      //do  } 


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -