Add function to escape html
This commit is contained in:
parent
895e94d5e1
commit
f2590b103f
|
@ -105,6 +105,8 @@ DOS_API DosQNetworkConfigurationManager *DOS_CALL dos_qncm_create();
|
|||
|
||||
DOS_API char * DOS_CALL dos_plain_text(char* htmlString);
|
||||
|
||||
DOS_API char * DOS_CALL dos_escape_html(char* input);
|
||||
|
||||
DOS_API void DOS_CALL dos_qncm_delete(DosQNetworkConfigurationManager *vptr);
|
||||
|
||||
DOS_API char * DOS_CALL dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath);
|
||||
|
|
|
@ -1124,6 +1124,11 @@ char *dos_plain_text(char* htmlString)
|
|||
return convert_to_cstring(QTextDocumentFragment::fromHtml( htmlString ).toPlainText().toUtf8());
|
||||
}
|
||||
|
||||
char *dos_escape_html(char* input)
|
||||
{
|
||||
return convert_to_cstring(QString(input).toHtmlEscaped().toUtf8());
|
||||
}
|
||||
|
||||
char *dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath)
|
||||
{
|
||||
QImage img(imagePath);
|
||||
|
|
Loading…
Reference in New Issue