Hongmu Notes
Home Program Notes The pre block tag of the empire cms editor always has an extra line break problem to solve
Program Notes Empire cms

The pre block tag of the empire cms editor always has an extra line break problem to solve

The pre block tag of the empire cms editor always has an extra line break problem to solve

In the editor that comes with Empire, when using the pre block, there will always be an extra line break. In order to handle this line break, three lines of code need to be added.


$string=str_replace("<pre>\r\n","<pre>",$string);
$string=str_replace("<pre>\n","<pre>",$string);
$string=str_replace("<pre>\r","<pre>",$string);

I have a dynamic website, so I put it directly in the corresponding action file.

If you also have a dynamic website, you can put the code in the sixth line from the bottom of the e/action/ShowInfo.php file, that is


echo stripSlashes($string);

above this code.

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Empire CMS database statement & SQL statement format

Empire CMS database statement & SQL statement format Program Notes Empire cms

Introduction to Imperial CMS extended SQL program writing, basic examples of Imperial CMS database statements & SQL statement formats: Note: The following examples are based on placing PHP files in the system root directory. Example 1: Connect to MYSQL program. (a.php)<?php require('e/class/connect.php'); //Introduce database configuration files and public function files requ…
👁 351
Empire CMS obtains the system COOKIE variable function getcvar()

Empire CMS obtains the system COOKIE variable function getcvar() Program Notes Empire cms

Get the system COOKIE variable function syntax: getcvar($var,$ecms) Description: $var: is the variable name $ecms: 0 is to set the foreground COOKIE variable, 1 is to set the background COOKIE variable. This parameter can be omitted and defaults to 0. Usage example: getcvar('mlusername'), get the user name of the front-end login member getcvar('loginu...
👁 295
Empire CMS smart label call field collection

Empire CMS smart label call field collection Program Notes Empire cms

Collect and classify all fields that support smart tag calls into Empire CMS smart tags: [e:loop={column ID/topic ID, number of items displayed, operation type, only display pictures with titles, additional SQL conditions, display sorting}] Template code content [/e:loop] Calling time: <?=date('m-d',$bqr[newstime])?> <?=dat…
👁 3749

Recommended reading

(PC+WAP) Constant Temperature Incubator Website Template – Constant Humidity Chamber Website Source Code Download (1073)

(PC+WAP) Constant Temperature Incubator Website Template – Constant Humidity Chamber Website Source Code Download (1073) Practical Collection pbootcms Template

A temperature-controlled incubator and constant humidity chamber website template (PbootCMS), compatible with both PC and WAP devices. Featuring a professional, tech-oriented design ideal for showcasing laboratory equipment such as constant temperature and humidity chambers and incubators. This template helps scientific instrument manufacturers showcase their products online and attract research and testing clients. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn...
👁 42
(Adaptive Mobile Version) Reducer Website Template – Reducer Equipment Website Source Code Download – 1074

(Adaptive Mobile Version) Reducer Website Template – Reducer Equipment Website Source Code Download – 1074 Practical Collection pbootcms Template

A PbootCMS website template for gearboxes and reduction equipment, compatible with both PC and WAP devices. The professional industrial design is ideal for showcasing gearbox products, technical specifications, and industrial applications. It enables transmission equipment manufacturers to showcase their products online and attract industrial manufacturing customers. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles...
👁 33
Empire CMS News Info Media Report Profile Collection Blue Responsive Crisp template 055

Empire CMS News Info Media Report Profile Collection Blue Responsive Crisp template 055 Practical Collection empire template

I imitated it once before and then again. The template for the second imitation used the new version of Empire CMS as its core. The whole site design is high-end and simple, and the SEO is reasonable! Suitable for personal blogs, information, articles, adaptive mobile phones and other tablet devices! All modifications are managed in the background! Easy and fast! Preview image decompression password 🔒 Hidden content: View after commenting If there is no password prompt on the download page, the default password is: www.4s5.cn
👁 436
(Adaptive Mobile Version) Door and Window System Website Template – Download the aluminum alloy door and window website source code (1075)

(Adaptive Mobile Version) Door and Window System Website Template – Download the aluminum alloy door and window website source code (1075) Practical Collection pbootcms Template

A PbootCMS website template for aluminum alloy doors and windows systems and sunrooms, compatible with both PC and WAP devices. The modern, professional design is ideal for showcasing door and window systems, sunroom products, and installation case studies. It helps door and window brands showcase their products online and attract both residential and commercial clients. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.c...
👁 62
Resource website typecho001 template

Resource website typecho001 template Program Notes Typecho

typecho001 template template please do not modify the folder name of this template. The folder name is: typecho001 1.4 Fix the js output problem on the article page 1.3 Fix the error prompt when the plug-in is not installed Optimize the list page code output 1.2 Fix the comment function and add a custom homepage title 1.1 Fix the comment reply asymmetry function Add a separate title setting function on the homepage Add the website favicon.ico icon Add one...
👁 198
(Adaptive Mobile Version) Wooden pallet website template; Wooden packaging box website source code download – 1076

(Adaptive Mobile Version) Wooden pallet website template; Wooden packaging box website source code download – 1076 Practical Collection pbootcms Template

A PbootCMS website template featuring wooden pallets and wooden packaging boxes, compatible with mobile devices. The professional and practical design is ideal for showcasing wooden pallets, packaging box products, and customized services. It helps wood product packaging businesses showcase their products online and attract logistics and manufacturing clients. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.cn | Related Articles...
👁 45