有没有工具可以自动清除不必要的html代码,添加丢失的html代码对,删除错误的html代码?
类似于这个在线工具
https://html-cleaner.com/发布于 2021-07-21 21:53:54
你可以这样做。
function stripe_woocommerce_short_description($the_excerpt) {
//wp_strip_all_tags will strip all HTML tags including script and style.
//return wp_strip_all_tags($the_excerpt);
//pass second parameter true if you want to remove break tag <br/> also.
//return wp_strip_all_tags( $the_excerpt, true );
//For Keep specific tags
return strip_tags($the_excerpt,"<img><table><p>");
}
add_filter('woocommerce_short_description', 'stripe_woocommerce_short_description',10, 1);https://stackoverflow.com/questions/68470040
复制相似问题