Security BLOG

AnQiCMS Help Document and User Guide

Does the `stringformat` filter support custom internationalization format output for datetime objects?

In the daily operation of the website, we often need to display date and time information in a user-friendly manner.Especially when facing users from different regions, it is particularly important to be able to output date and time formats that conform to local customs, which is what we commonly refer to as 'internationalized format output'.Today, let's talk about a commonly used filter `stringformat` in AnQiCMS, and see if it supports this customized internationalized format output for date and time objects.

📅 November 8, 2025 👁️ 63

In the Anqi CMS backend custom field, if a field stores a URL, how can you use the `stringformat` filter to validate its format in the template?

Storing URLs in the AnQiCMS backend custom fields is a very practical feature, allowing us to add various personalized information to content models based on business needs.However, when these URLs need to be displayed in front-end templates, we not only need to ensure that they can be output correctly, but sometimes we also hope to perform some basic format checks to enhance the robustness and user experience of the page.

📅 November 8, 2025 👁️ 68

Can the `stringformat` filter convert a Go language slice or Map into a readable JSON string output?

When developing templates for AnQiCMS, we often encounter such questions: The background data is a slice (Slice) or map (Map) structure in Go language, and if we want to output these data in a readable JSON string format in the front-end template, can the `stringformat` filter built into AnQiCMS handle it?This is indeed a very practical requirement, after all, JSON format is ubiquitous in modern web development.

📅 November 8, 2025 👁️ 71

How to safely handle user input that may contain JS code in the comment or message form of Anqi CMS using the `escapejs` filter?

In website operation, the comment area and message board are important channels for interacting with users and collecting feedback.However, this area where users can freely enter content is often an entry point for potential security risks, especially cross-site scripting (XSS) attacks.As website administrators, we must ensure that the content entered by users is safe when displayed on the frontend and is not exploited maliciously.The Anqi CMS, a system focused on providing secure and efficient content management solutions, has provided us with powerful tools to meet such challenges. Today

📅 November 8, 2025 👁️ 51

How does the `stringformat` filter handle null or invalid input in AnQi CMS, will it return an error or a default value?

In Anqi CMS template design, we often encounter scenarios where we need to format variable output.At this point, the `stringformat` filter is particularly important, as it helps us clearly display numbers, strings, and even other types of data according to the format we preset.However, when using such tools, a common and crucial question is: how will `stringformat` handle it when the variable itself is null or invalid?Is it a direct error that causes the page to crash, or is there a more elegant default behavior?

📅 November 8, 2025 👁️ 62

How to use the `stringformat` filter in Anqi CMS template to format price numbers as currency (such as “¥%.2f”)?

When displaying product or service prices on a website, we all hope that they look clear and professional, easy to understand.A sequence of price numbers without currency symbols and inconsistent decimal places, which not only affects the appearance but may also raise doubts about the professionalism of the product. 幸运的是,AnQiCMS(AnQiCMS)强大的模板引擎提供了多种实用的过滤器,其中 `stringformat` 过滤器就是将数字格式化为标准货币形式的利器。

📅 November 8, 2025 👁️ 65

How to configure the separator (`sep`) and whether to display the parent category title (`showParent`) for the `tdk` filter in Anqin CMS?

During website operations and SEO optimization, the page title (Title) is a key element to attract user clicks and improve search engine rankings.AnQiCMS provides a flexible `tdk` filter, allowing us to finely control the display of page TDK (Title, Description, Keywords).Among these parameters, `sep` and `showParent` play a crucial role in building page titles with rich hierarchy and clarity.

📅 November 8, 2025 👁️ 60

How to concatenate the article title (Title) with the system-defined website name (SiteName) through the `tdk` filter and output it to the <title> tag in the Anqi CMS template?

In website operation, the importance of the `<title>` tag is self-evident. It is not only the key for search engines to understand the theme of the page, but also the content that users see first in the search results.A well-crafted page title that can effectively increase click-through rates and have a positive impact on SEO optimization.Therefore, how to organically integrate the core title of the article with the brand name of the website to form an accurate and attractive `<title>` tag is a fundamental and important link in the design of website templates.AnQiCMS as a feature-rich enterprise-level content management system

📅 November 8, 2025 👁️ 49

The `dump` filter has what practices in debugging Anqi CMS templates, and how to clearly view the structure and value of complex variables?

During the template development process of AnQi CMS, we often encounter the need to view variable content and structure, especially when dealing with complex objects passed from the background.If you cannot clearly know what is inside the variable, debugging will be as difficult as a blind man feeling an elephant.The AnqiCMS adopts the Pongo2 template engine syntax similar to Django, providing rich tags and filters to help us build dynamic pages, one extremely powerful debugging tool is the `dump` filter.### `dump` filter

📅 November 8, 2025 👁️ 67

How to safely output HTML code passed from the backend in Anqi CMS template using the `safe` filter without escaping?

Build and manage websites in AnQi CMS, we often make good use of its powerful and flexible template system to present colorful content.The template engine of AnQi CMS has adopted the syntax of Django templates, which brings us a familiar development experience and powerful features.However, when handling HTML code passed from the backend to the frontend, we encounter an important security mechanism: **automatic escaping**.

📅 November 8, 2025 👁️ 63