Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Add function to escape html
Browse files Browse the repository at this point in the history
  • Loading branch information
richard-ramos committed Sep 2, 2020
1 parent 7d8edc6 commit d663d22
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/include/DOtherSide/DOtherSide.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 5 additions & 0 deletions lib/src/DOtherSide.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d663d22

Please sign in to comment.