From 14052035c77f981d3751b6e6cd1eda63dd1968e4 Mon Sep 17 00:00:00 2001 From: Richard Ramos Date: Mon, 28 Sep 2020 14:26:52 -0400 Subject: [PATCH] feat: obtain url from user input --- src/nimqml.nim | 3 +++ src/nimqml/private/dotherside.nim | 1 + 2 files changed, 4 insertions(+) diff --git a/src/nimqml.nim b/src/nimqml.nim index 018d5ee..aa3ec6b 100644 --- a/src/nimqml.nim +++ b/src/nimqml.nim @@ -48,3 +48,6 @@ proc plain_text*(htmlString: string): string = proc escape_html*(input: string): string = result = $(dos_escape_html(input.cstring)) + +proc url_fromUserInput*(input: string): string = + result = $(dos_qurl_fromUserInput(input.cstring)) diff --git a/src/nimqml/private/dotherside.nim b/src/nimqml/private/dotherside.nim index e03e1bd..07a8207 100644 --- a/src/nimqml/private/dotherside.nim +++ b/src/nimqml/private/dotherside.nim @@ -306,3 +306,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.} +proc dos_qurl_fromUserInput(input: cstring): cstring {.cdecl, dynlib: dynLibName, importc.}