HTML в обычный текст - PullRequest
       46

HTML в обычный текст

0 голосов
/ 23 января 2020

Я создаю отправителя электронной почты SMTP. Для того, чтобы создать текстовое сообщение. Я перепробовал все функции ниже, но не работает. Есть какие-нибудь предложения?

echo html_entity_decode(htmlspecialchars(trim(strip_tags($arrPOST['content'])),ENT_QUOTES));
<style type="text/css">
#preview_sec {width:700px; margin:0 auto;} #preview_sec .row {max-width: 100% !important;margin-left: 0;} #preview_sec .col-lg-12 {margin: 0 !important;} #preview_sec .js-tooltip, #preview_sec #email_hide {display: none;} #preview_sec .well {background: transparent;border: 0px solid transparent;box-shadow: 0 0px 0px transparent;} #preview_sec .well p {color: #000;} #preview_sec .dynamic .col-md-10 {padding-left: 0 !important; padding-right: 0 !important; background-color: transparent !important;}</style>
<div id="preview_sec" style="width:700px; margin:0 auto;">
    <div class="row" style="font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: 100%; width: 700px; height: auto; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px -15px 0px 0px; padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: none; position: static; min-height: 0px;">
        <div class="col-lg-12" style="margin: 0px; font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 700px; height: 1673.59px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: left; position: relative; min-height: 1px;">
            <div class="well canvas ui-sortable" data-handle="" style="text-align: center; font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 700px; height: 20px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; border: none; border-radius: 2px; line-height: 18.5714px; float: none; position: relative; min-height: 20px;">
                &nbsp;</div>
            <div class="well canvas ui-sortable" data-handle="" style="text-align: center; font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 700px; height: 1653.59px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; border: none; border-radius: 2px; line-height: 18.5714px; float: none; position: relative; min-height: 20px;">

                <div style="clear:both">
                    &nbsp;</div>
                <section class="dynamic sec_boxed ui-sortable-handle" style="font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 700px; height: 121px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: none; position: relative; min-height: 0px;">
                <div class="row" style="font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: 100%; width: 700px; height: auto; display: flex; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px -15px 0px 0px; padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: none; position: static; min-height: 0px; justify-items: center;">
                    <div class="col-md-1" style="font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 58px; height: 1px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: left; position: relative; min-height: 1px;">
                        &nbsp;</div>
                    <div class="col-md-10 text box_text" style="border: 2px solid rgba(0, 0, 0, 0); border-radius: 0px; min-height: 80px; background-color: rgba(0, 0, 0, 0); padding: 18px 0px; overflow-wrap: break-word; font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 600px; height: 80px; display: block; color: rgb(0, 0, 0); margin: 0px; line-height: 18.5714px; float: left; position: relative;">
                        <p style="font-size: 13px; text-decoration: none solid rgb(255, 255, 255); min-width: 0px; max-width: none; width: 543.328px; height: 36px; display: block; color: rgb(255, 255, 255); background-color: rgb(51, 51, 51); margin: 0px auto; padding: 20px; border: 0px none rgb(255, 255, 255); border-radius: 0px; line-height: 18.5714px; float: none; position: static; min-height: 0px;">
                            This is a Boxed Text block. Use a contrasting background to draw attention to this content.sxsxsxs</p>
                    </div>
                    <div class="col-md-1" style="font-size: 13px; text-decoration: none solid rgb(0, 0, 0); min-width: 0px; max-width: none; width: 58px; height: 1px; display: block; color: rgb(0, 0, 0); background-color: rgba(0, 0, 0, 0); margin: 0px; padding: 0px; border: 0px none rgb(0, 0, 0); border-radius: 0px; line-height: 18.5714px; float: left; position: relative; min-height: 1px;">
                        &nbsp;</div>
                </div>
                </section>
                <div style="clear:both">
                    &nbsp;</div>
            </div>
        </div>
    </div>
</div>

...