Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Rich text filtering method, rich text filtering device and computer readable storage medium

A text filtering and text technology, applied in the security field, can solve problems such as bypassing and loss of rich text effect, and achieve the effect of improving security

Pending Publication Date: 2021-06-01
CHINA TELECOM CORP LTD
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The existing methods for preventing cross-site scripting attacks have the following problems: directly escaping the rich text will lose the effect of the rich text itself; and single and double quotes are generally not escaped, which has the advantage of being exploited by attackers. Possibility; In addition, label filtering is mostly blacklist filtering, and there is a possibility of bypassing

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Rich text filtering method, rich text filtering device and computer readable storage medium
  • Rich text filtering method, rich text filtering device and computer readable storage medium
  • Rich text filtering method, rich text filtering device and computer readable storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0032] Embodiments for realizing the present invention will be described in detail below in conjunction with the accompanying drawings.

[0033] figure 1 A flowchart showing a rich text filtering method according to an embodiment of the present invention.

[0034] In step S1, a character string of rich text is obtained.

[0035] Step S2, parsing the character string into an object including label data and content.

[0036] Wherein, the label data includes at least a label, and the label data may also include attributes and / or contents, and the attributes may include attribute values.

[0037] When parsing a string, parse it according to the rich text syntax. There is no restriction on the parsing method of the character string, and an existing parsing method may be used, for example, parsing may be performed according to HTML syntax. As an example, the browser's rules for parsing rich text strings can be referred to, and the browser's parsing method can be simulated to par...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention provides a rich text filtering method, a rich text filtering device and a computer readable storage medium. The invention discloses a rich text filtering method, which comprises the following steps of: acquiring a character string of a rich text, analyzing the character string into an object comprising label data and content, traversing object nodes, filtering the label data when the current traversal object node is the label data, and transferring meaning for the content when the current traversal object node is the content. And after all the object nodes are traversed, recombining the objects which are subjected to filtering aiming at the label data and escape aiming at the content into a character string for representing the rich text.

Description

technical field [0001] The invention relates to the security field, and is a technology for preventing rich text from being attacked by cross-site scripting (XSS). Background technique [0002] Different from normal text input, the rich text editor allows users to embed tags and styles to provide rich formatting, making the text output more beautiful and layered. [0003] Most of the current ways to prevent cross-site scripting attacks are to use tag filtering, blacklist removal of keywords, or character escaping for defense. There is no systematic defense method for cross-site scripting attacks against rich text alone. [0004] The existing methods for preventing cross-site scripting attacks have the following problems: directly escaping the rich text will lose the effect of the rich text itself; and single and double quotes are generally not escaped, which has the advantage of being exploited by attackers. Possibility; In addition, label filtering is mostly blacklist filt...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F40/14G06F40/154G06F21/56
CPCG06F21/563
Inventor 郭望纾
Owner CHINA TELECOM CORP LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products