PDA

View Full Version : is it wrong?


TTayfun
11-25-2017, 05:53 PM
i want to replace pre code to guest, and i am trying his code, i hope i am wrong? can you help me?

<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: 6px;
border: 1px inset;
width: 640px;
height: 34px;
text-align: left;
overflow: auto">ABC</pre>



$this->post['message'] = preg_replace("/<pre.*?<\/pre>/i", $vbulletin->options['hide_message'], $this->post['message']);

Seven Skins
11-25-2017, 07:24 PM
Try this ... not tested with vbulletin but works in normal PHP script.

$this->post['message'] = preg_replace("#\<pre(.*)/pre>#iUs", $vbulletin->options['hide_message'] , $this->post['message']);

TTayfun
11-25-2017, 09:10 PM
Try this ... not tested with vbulletin but works in normal PHP script.

$this->post['message'] = preg_replace("#\<pre(.*)/pre>#iUs", $vbulletin->options['hide_message'] , $this->post['message']);

thank you i will try and write results here. :up: