Security BLOG

AnQiCMS Help Document and User Guide

How to combine other filters with the `add` filter to ensure safe concatenation and prevent XSS attacks when processing user input?

In AnQi CMS, managing website content involves entering a variety of information regularly.Whether it is the main text of the article, user comments, or form submissions, this user-generated content injects vitality into the website while also bringing potential security risks, the most common and severe of which is XSS (Cross-site Scripting attack).This article will discuss how the `add` filter works in processing user input content, how it协同acts with other security filters to build a strong defense line, effectively preventing XSS attacks.

Calendar date 2025-11-07 👁️ 73

How to use the `add` filter to dynamically add a uniform prefix or suffix to the single page titles in the `pageList`?

In Anqi CMS, content management is not limited to the backend's add, delete, modify, and query, but also manifests in the flexibility and diversity of front-end display.In the face of common single-page websites (such as "About Us", "Contact Us", etc.), sometimes we hope that they can be unified with specific identifiers when displayed in lists or navigation, such as If you modify the background title one by one, it is not only inefficient but also lacks uniformity and maintainability.At this time, utilizing the powerful template engine function of AnqiCMS, with the clever filter

Calendar date 2025-11-07 👁️ 57

How does the `add` filter handle the addition/pasting operation with boolean values `true` and `false` as well as numbers or strings?

In Anqi CMS template development, we often need to process and display data.Among them, the `add` filter is a very practical tool that allows us to add numbers and concatenate strings.However, when the boolean values `true` and `false` are involved in these operations, their behavior may puzzle some users who are new to the subject.Today, let's take a deep dive into how the `add` filter handles addition or concatenation operations with boolean values, numbers, or strings.

Calendar date 2025-11-07 👁️ 56

How to dynamically generate JavaScript code snippets in AnQiCMS templates and use the `add` filter to concatenate variables?

In website operations, we often need to make the page more intelligent and interactive.AnQiCMS as an efficient and flexible content management system not only provides powerful content organization and display capabilities, but also allows us to ingeniously integrate dynamic logic in templates, such as by generating JavaScript code snippets to achieve more complex functions.AnQiCMS's template engine syntax is similar to Django, which provides great convenience for us to dynamically process data.It is developed based on the Go language, runs fast

Calendar date 2025-11-07 👁️ 53

Can the `add` filter be used to generate dynamic HTML attributes, such as the value of `data-` attributes?

In modern web development, dynamically generating HTML attributes, especially `data-` attributes, has become a common requirement.These properties not only provide additional data support for front-end JavaScript, but also enhance the presentation of elements without affecting the page semantics.AnQiCMS as a content management system that focuses on flexibility, its powerful template engine naturally also provides the possibility to meet this need.So, can the `add` filter in the AnQiCMS template handle the task of dynamically generating `data-` attribute values?

Calendar date 2025-11-07 👁️ 59

How to use the `add` filter to dynamically add additional descriptions to the field in the AnQiCMS backend user group management (`userGroupDetail`)?

In the AnQiCMS management background, the user group management (`userGroupDetail`) module is the basis for us to divide permissions, set levels for different user groups, and even configure VIP services.Generally, each user group has its core attributes, such as name, level, price, etc., which are directly displayed on the back-end interface for convenient daily management.However, sometimes we hope that these fields are not just cold data, but can also have some additional, more descriptive information. For example

Calendar date 2025-11-07 👁️ 61

How to pass the `add` filter as a parameter to the `macro` macro function and perform internal text processing?

In AnQi CMS daily content operation, we pursue efficient and flexible management and display of website content.The template system is the core of achieving this goal, among which the `macro` macro function and the `add` filter are two very practical tools.Understand how they work together, especially how to use the `add` filter for internal text processing in macro functions, which can greatly enhance the reusability and dynamism of our templates.The AnQi CMS template system uses syntax similar to Django, which allows us familiar with Web development to quickly get started.

Calendar date 2025-11-07 👁️ 60

When it comes to concatenating a large number of strings, which filter, `add` or `join`, performs better?

In AnQi CMS template development, we often need to combine different text fragments into a complete string to meet the display requirements of the page.AnQi CMS provides various template filters to complete this task, among which the `add` and `join` filters are two commonly used string concatenation tools.However, when faced with the need to concatenate a large number of strings, choosing the right tool becomes particularly important, as this directly affects the speed of page rendering and user experience.###

Calendar date 2025-11-07 👁️ 64

How does the `add` filter assist in building dynamic `<img>` tag `alt` or `title` attribute text to optimize SEO?

In Anqi CMS, every detail of the website is related to the final operating effect, especially in search engine optimization (SEO).We all know that high-quality images can attract users, but if these images are not 'understood' by search engines, their value will be greatly reduced.At this time, the `alt` and `title` attributes of the `<img>` tag are particularly important.They can not only improve the accessibility of the website but are also a key window for search engines to convey the content and context of the image.However, manually writing a unique

Calendar date 2025-11-07 👁️ 55

How to concatenate `{module}` and `{id}` variables using the `add` filter in Custom URL mode to build a link?

In AnQi CMS, the way websites build links is crucial for SEO and user experience.Although the system provides various predefined pseudo-static rules and automatically generated links, but in certain specific scenarios, we may need to control the URL structure more finely, such as in the custom URL mode, where we concatenate the content model (`{module}`) and content ID (`{id}`) variables to form a unique link.This is not a difficult task, the powerful template engine of Anqi CMS combined with its flexible filter mechanism allows us to easily achieve this goal. Today

Calendar date 2025-11-07 👁️ 68