In AnQiCMS, can you set a default HTML content filtering strategy to be applied to all new published content?

Calendar 👁️ 56

In AnQiCMS, content management is one of the core functions, and ensuring the quality and security of published content is a focus for many website operators.About whether it is possible to set a default HTML content filtering strategy to be applied to all new published content?This is indeed a topic worth discussing.

From the features provided by AnQiCMS, the system has adopted a multi-dimensional strategy in terms of content security and filtering, and some of its functions indeed have an impact on the HTML of newly published content.

Core feature mystery: link handling strategy in content settings

When talking about filtering HTML of new content, the first thing that comes to mind is the management of links and embedded content.In the AnQiCMS backend settings, there is a very important area - "Content Settings".Here provides a name calledDo you want to automatically filter external linksThe options

This feature is very critical for many website operators.When we choose to enable it, the system will automatically detect external links in the content at the time of publication.According to your specific needs, it can do two things:

  1. Automatically remove external linksIf this option is checked and configured to strict filtering, then all the HTML pointing to external sites in the content<a>Labels will be removed. This helps maintain the purity of the website content, avoid guiding users to irrelevant external sites, and also reduces the risk of the website becoming a channel for spreading spam links.
  2. addrel="nofollow"property: Another common way of processing is that the system will retain external links, but will automatically addrel="nofollow"The attribute is very important for SEO optimization. It tells search engines not to follow these links, nor will it pass the weight of the current website to the target site, effectively avoiding the loss of PR value.

The application of this feature, undoubtedly, is a default filtering strategy for specific HTML elements (i.e., hyperlinks) in all newly released content.It is not simply stripping all HTML tags, but provides powerful automated management for the most common security and SEO risks.

Overall consideration of content security in AnQiCMS

In addition to fine management for external links, AnQiCMS also mentioned in the "Project Advantages" thatContent security managementAndsensitive word filteringFunctions such as these. Although the document does not directly explain how these functions can be filtered directlyHTML structureBut they together form a security barrier before the content is published.Sensitivity word filtering is mainly aimed at text content, ensuring that no illegal or inappropriate information is published, which is different from HTML structure filtering, but both are for the purpose of ensuring the overall quality and compliance of the content.

Built-in system “Prevent collection interference codeThe function focuses more on the protection of content after publication, preventing the original content from being maliciously scraped, which is different from the filtering strategy of content input, but serves the goal of content operation.

Flexible output control: a purification means at the template level

It is worth mentioning that AnQiCMS also provides a powerful template engine, which allows us to further control the presentation of HTML by using various filters when outputting content. Although this is not applied to all newly published content,Default input strategyBut it provides great flexibility and security for the final presentation of content. For example:

  • striptagsandremovetagsFilterThese filters can remove all HTML tags or specified HTML tags from the variable content during template rendering.If a content area requires strict plain text display, these filters can be applied in the template.
  • safeandescapeFilter: The system defaults to escaping all template output to prevent XSS attacks.safeFilters allow us to declare certain content as safe, which does not need to be escaped, andescapeIt forces the escaping. These are allContent output phaseA powerful tool for managing HTML.

By using these template filters, even if certain HTML is included when the content is published, we can purify it according to the needs in different display scenarios, achieving highly customized content presentation.

Summary and suggestions

In conclusion, AnQiCMS indeed provides a kind ofdefault HTML filtering strategy for external links in newly published contentThat is, configure "whether to automatically filter external links" in "Content Settings".Although it is not a universal filtering rule covering all HTML tags, it solves the most common HTML related issues in content security and SEO optimization.

For more complex HTML tag filtering requirements, operators may need to standardize at the content editor level or combine with the powerful template functions of AnQiCMS to fine-tune control using filters during content output.

Frequently Asked Questions (FAQ)

  1. Does AnQiCMS support custom whitelist/blacklist to control allowed HTML tags for publication?AnQiCMS's documentation does not directly mention providing a global, configurable HTML tag whitelist or blacklist feature to apply to the HTML filtering of all new content published.Its main filtering strategy is currently focused on external links and text sensitive words.If you need more detailed HTML tag control, it is usually necessary to use editor plugins to limit or process through filters when outputting templates.
  2. Does the 'Automatically filter external links' feature also apply to internal links?The "Is the external link filtering feature usually aimed at" function is usually forexternal linksDesigned. The document clearly mentions that it is 'remote images' and 'external links', which implies that its main purpose is to manage external resources with different domain names from the current website.For internal links, they are usually not filtered to ensure the normal operation of website internal navigation and content references.
  3. If I want to automatically remove all HTML tags when publishing content, does AnQiCMS have a direct setting for that?AnQiCMS does not provide a direct, global setting in the content publishing stage to automatically remove all HTML tags.The editor usually retains the HTML format of the user's input.To implement plain text content, you can use front-end templates to display itstriptagsProcess with filters or avoid using formatting tools when using the editor, enter in plain text mode.

Related articles

How to ensure that the rich text content of AnQiCMS back-end editor is safe HTML when displayed on the front end?

In daily website content operation, we often use the rich text feature of the AnQiCMS backend editor to carefully arrange articles, product details, or single-page content to present more beautiful and attractive page effects.From setting title styles, inserting images, creating lists, to embedding videos, rich text editors bring us great convenience and creative freedom.However, behind these flexible formatting capabilities, there is also a hidden, non-negligible security issue - how to ensure that the content containing custom HTML structures is displayed safely and correctly on the front end of the website? After all

2025-11-08

Why does the `escape` filter sometimes cause HTML entities to be doubly escaped?

When using AnQiCMS for website content management and template development, we may encounter some confusing display issues, one of which is the double escaping of HTML entities.This usually appears as HTML tags that should be displayed as formatted text on the page, but are instead become `&lt;`p & gt; `such visible characters, even worse & amp;lt;p&amp;gt;`. This phenomenon not only affects the visual appearance of the website, but may also cause the content to lose its original style

2025-11-08

How to use AnQiCMS tool to batch clean imported HTML content during content migration?

When performing website content migration, we often encounter a difficult problem: the imported HTML content has inconsistent formats, redundant tags, and may even contain some outdated or incompatible code.These 'HTML clutter' not only affect the visual consistency of the website, but may also slow down the page loading speed, and even have a negative impact on search engine optimization (SEO).Fortunately, AnQiCMS has provided us with a set of efficient and flexible tools that can help us batch clean up the imported HTML content

2025-11-08

How to configure the HTML content filtering rules for all sites in a multi-site environment?

In a multi-site operation environment, ensuring the content security and display consistency of all sites is one of the core tasks.Especially the filtering rules for HTML content, which are directly related to user experience, information security, and even search engine optimization.The AnQi CMS is a rich-featured system that provides us with flexible tools to manage these rules.To implement a unified configuration of HTML content filtering rules across multiple sites, we need to combine the built-in features of the system with operational strategies to achieve the goal.First, understand the basic settings of AnQi CMS in content processing is crucial

2025-11-08

How to quickly view the original HTML content contained in the variable when debugging the AnQiCMS template?

During the template development process of Anqi CMS, we often need to view the content contained in variables, especially when variables may carry HTML structures. How to quickly and accurately see the original HTML content instead of the parsed or escaped result by the browser is the key to efficient debugging.Anqi CMS uses a template engine syntax similar to Django, providing several powerful tools to help us solve this problem.Understanding Debugging Needs: Why Do We Need to View the Original HTML?

2025-11-08

How to use AnQiCMS filter to batch modify specific attribute values in HTML content?

In website content management, we often encounter scenarios where we need to uniformly adjust or batch modify specific attribute values in a large amount of HTML content.For example, you may need to update the height properties of all images, or add specific `rel` attributes to some links, or even adjust the styles of certain tags generated by the rich text editor.AnQiCMS provides flexible tools to meet these needs, among which the batch replacement function is a powerful tool for directly modifying stored content, while the template filter can dynamically transform content at output time, combined, they can efficiently manage and optimize website content

2025-11-08

How should AnQiCMS template files be named and organized to achieve **display effects??

In Anqi CMS, the display effect of the website is closely related to the naming and organization of the template files.A well-planned template structure not only makes the website look neat and beautiful but also greatly improves development efficiency, facilitates later maintenance, and ensures that content is presented in different scenarios. ### The Foundation of Template Files: `/template` Directory and `config.` All visual presentations of Anqi CMS website start from the `/template` directory.This is the home of all template files. Each set of independent templates

2025-11-08

How to ensure that AnQiCMS template files are encoded in UTF-8 to avoid garbled page display?

During the process of building a website with AnQiCMS, you may occasionally encounter the situation where the displayed content is garbled, especially Chinese characters.This not only affects the aesthetics and user experience of the website, but may also have a negative impact on search engine optimization (SEO).The problem of garbled characters is usually related to the inconsistent encoding format of template files, and ensuring that AnQiCMS template files are saved in UTF-8 encoding is a key step to solving this problem.Why UTF-8 Encoding is Crucial?

2025-11-08