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:
- 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. - add
rel="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)
- 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.
- 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.
- 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 it
striptagsProcess with filters or avoid using formatting tools when using the editor, enter in plain text mode.