Add function to escape html

This commit is contained in:
Richard Ramos 2020-09-01 15:04:43 -04:00 committed by RichΛrd
parent 57d6e6459d
commit d48ed1ea37
2 changed files with 4 additions and 0 deletions

View File

@ -45,3 +45,6 @@ proc image_resizer*(imagePath: string, maxSize: int = 2000, tmpDir: string): str
proc plain_text*(htmlString: string): string =
result = $(dos_plain_text(htmlString.cstring))
proc escape_html*(input: string): string =
result = $(dos_escape_html(input.cstring))

View File

@ -305,3 +305,4 @@ proc dos_qabstracttablemodel_index(modelPtr: DosQAbstractTableModel, row: cint,
proc dos_image_resizer(imagePath: cstring, maxSize: cint, tmpDirPath: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_plain_text(htmlString: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}
proc dos_escape_html(input: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}