I have a RoundCube plugin that writes the message body to the database and after that I need to parse the data into another table. By using certain functions in RoundCube I am able to remove all html tags and a </td>
is replaced by '
' and </tr>
is replaced by '
'. This make the parsing of my data very easy and robust. There is only one drawback, the html data are broken into fix lines with an =
at the end, e.g.:
<td valign=3D"bottom" style=3D"color:#444444;padding:5px 10px 5=
px 0px;font-size:12px;border-bottom:1px solid #eeeeee;"><b>Discount</b></td=
><td valign=3D"bottom" align=3D"right" style=3D"color:#444444;padding:5px 0=
px 5px 0px;font-size:12px;border-bottom:1px solid #eeeeee;text-align:right;=
"><b>Price after discount</b></td>
Now, the </td=
's are not getting recognised and therefore the Discount are joined to Price after discount in the following way DiscountPrice after discount
, instead of Discount
Price after discount
. This is all the way through the code and are really causing me severe problems.
I tried to remove the = and break with things like:
$msg_body = str_replace('=', '', $msg_body);
$msg_body = str_replace('=
', '', $msg_body);
$msg_body = str_replace('= ', '', $msg_body);
with no real success. I do not know which type of break comes after the = sign, whether it is a line break or paragraph break and tried to find out, but in vain, even looked at the RoundCube code. Echoing out the html did not revealed anything to me as well.
I post this here as a general php and html question in the hope that someone can help me to simply remove these = sign and the mysterious (to me) breaks so that
</td=
>
becomes
</td>
, etc.