Unlock instant, AI-driven research and patent intelligence for your innovation.

Html escape character replacement method, device, and terminal

An escape character and escape character technology, applied in the field of devices and terminals, HTML escape character replacement methods, can solve problems such as increased complexity and poor performance, and achieve simple implementation, improved performance, and convenient development and maintenance. Effect

Active Publication Date: 2018-07-17
广州方硅信息技术有限公司
View PDF4 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example: when the back-end data is rendered by the jquery.html() method, it is necessary to replace the html escape characters (&, etc.) in the content for security reasons. If you follow the method mentioned above, especially in some list data When displaying, the writing method at this time will become: xxx.replaceAll("",">;").replaceAll("&",""&;") , that is, the complexity of the code increases as the content of the replacement increases, and the performance also deteriorates

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
  • Html escape character replacement method, device, and terminal
  • Html escape character replacement method, device, and terminal
  • Html escape character replacement method, device, and terminal

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0031] The core of the present invention is to provide a method, device and terminal for replacing html escaped characters; the implementation is simple, easy to use, universal, scalable, convenient for development and maintenance, improves the quality of development efficiency, and has high performance, compared with previous processing methods , which greatly improves the performance of page data rendering.

[0032] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creat...

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 discloses an html escape character replacement method. The method includes: determining whether a received parameter is an escape character; if it is an escape character, the escape character substitution is performed by calling replaceEscapeChar according to the parameter and the replacement result is returned. If it is not an escape character, determining whether the parameter is two; if the parameter is two strings, the strings are replaced by calling replace according to the parameter and the replacement result is returned. If the parameter is not two strings, all strings arereplaced by calling replaceChar according to the parameter and the replacement result is returned. This method is simple, easy-to-use, generic, extensible, easy to develop and maintain, improves thequality of development efficiency and replacement performance is high. Compared with the prior processing method, the method greatly improves the performance of page data rendering. The invention alsodiscloses an html escape character replacement device and a terminal with the above benefits.

Description

technical field [0001] The invention relates to the technical field of data processing, in particular to a method, device and terminal for replacing html escape characters. Background technique [0002] At present, the replace method that comes with the web front-end string or the replaceAll method implemented by developers based on the string prototype only replaces one type of string at a time, and replaces multiple different non-sequential characters at a time. For example: when the back-end data is rendered by the jquery.html() method, it is necessary to replace the html escape characters (<>&, etc.) in the content for security reasons. If you follow the method mentioned above, especially in some list data When displaying, the writing method at this time will become: xxx.replaceAll("<","<;").replaceAll(">",">;").replaceAll("&",""&;") , that is, the complexity of the code increases as the replaced content increases, and the performance also deteriorates...

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): G06F8/30G06F8/41G06F8/72G06F17/22
CPCG06F8/315G06F8/4441G06F8/72G06F40/126
Inventor 陈高昌
Owner 广州方硅信息技术有限公司