Welcome Guest, Not a member yet? Register   Sign In
xml_convert error in long space and end content in javascript 4.5.4
#1

in this case, code working
PHP Code:
$rm_question  trim(preg_replace('/\s+/'' 'xml_convert($cauhoi))); 

in javascript show:
Code:
learntips: '<p>Chọn <strong>đáp án 2</strong> trong mẹo nhé.</p>

in this case, code dont work so middle space in the content and end content
PHP Code:
$rm_question  =  xml_convert($cauhoi))); 

Code:
<p>Chọn <strong>đáp án 2</strong> trong mẹo nhé.</p>

<p><u><strong>Mẹo hành vi sai bị nghiêm cấm, không được khi tham gia giao thông</strong></u></p>

<ol>
<li>Cố ý làm hỏng</li>
<li>Buông cả hai tay</li>
<li>Trên cầu hẹp một làn xe</li>
<li>Đi vào phần đường dành cho người đi bộ</li>
<li>Chạy quá tốc độ tối đa cho phép</li>
<li>Lạng lánh đánh võng</li>
<li>Vận chuyển trái phép hàng nguy hiểm, hàng cấm</li>
<li>Đe dọa, xúc phạm, xâm phạm</li>
</ol>

I don't know if function helper xml_convert will add trim and remove all spaces in the future
Reply


Messages In This Thread
xml_convert error in long space and end content in javascript 4.5.4 - by startup - 09-04-2024, 12:28 PM



Theme © iAndrew 2016 - Forum software by © MyBB