the_content: How can I strip out all the html?
-
I am inserting PHP snippet of a PopShops storefront into pages (using exec_PHP) which works really well, EXCEPT that I get all of this HTML inserted into my code. The PopShops code has CSS in it which breaks because of the breaks, etc that are put into it.
For example, the PHP code (when served) should look like this:
<style type="text/css" media="screen"> #PopShop238 table.pspsWrapper{margin:0 auto;border-collapse:collapse;width:530px;} #PopShop238 td{vertical-align:top;padding:0;} #PopShop238 a,#PopShop238 td{font-family:Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;font-size:11px;color:#363636;font-style:normal;font-weight:normal;text-align:center;} #PopShop238 a{color:#0066FF;font-style:normal;font-weight:normal;text-decoration:underline;} #PopShop238 a img{border:none;} #PopShop238 p{margin:0;padding:3px;} #PopShop238 .pspsCell{border:2px solid #FFCCFF;width:250px;padding:5;background-color:#fff;} #PopShop238 .pspsMain{padding:0 0 10px 0;width:100%;text-align:center;} #PopShop238 .pspsPager{text-align:center;padding:10px;} #PopShop238 .pspsPager a,#PopShop238 .pspsPager span{font-weight:bold;text-decoration:none;padding:2px;line-height:200%;border:2px solid #FFCCFF;;} #PopShop238 .pspsPager .pspsCurrentPage{background-color:#FFCCFF;color:#000;} #PopShop238 .pspsPager .pspsInactivePage{color:#aaa;} </style> <div id="PopShop238">
But the get_content pushes it out like this:
<p><style type="text/css" media="screen"><br /> #PopShop4256 table.pspsWrapper{margin:0 auto;border-collapse:collapse;width:530px;}<br /> #PopShop4256 td{vertical-align:top;padding:0;}<br /> #PopShop4256 a,#PopShop4256 td{font-family:Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;font-size:11px;color:#363636;font-style:normal;font-weight:normal;text-align:center;}<br /> #PopShop4256 a{color:#0066FF;font-style:normal;font-weight:normal;text-decoration:underline;}<br /> #PopShop4256 a img{border:none;}<br /> #PopShop4256 p{margin:0;padding:3px;}<br /> #PopShop4256 .pspsCell{border:2px solid #FFCCFF;width:250px;padding:5;background-color:#fff;}</p> <p> #PopShop4256 .pspsMain{padding:0 0 10px 0;width:100%;text-align:center;}<br /> #PopShop4256 .pspsPager{text-align:center;padding:10px;}<br /> #PopShop4256 .pspsPager a,#PopShop4256 .pspsPager span{font-weight:bold;text-decoration:none;padding:2px;line-height:200%;border:2px solid #FFCCFF;;}<br /> #PopShop4256 .pspsPager .pspsCurrentPage{background-color:#FFCCFF;color:#000;}<br /> #PopShop4256 .pspsPager .pspsInactivePage{color:#aaa;}<br /> </style></p>
How can I get it to just use the PHP and not do any post-processing?
- The topic ‘the_content: How can I strip out all the html?’ is closed to new replies.