Add function to strip html tags
This commit is contained in:
parent
7a286e548e
commit
895e94d5e1
|
@ -103,6 +103,8 @@ DOS_API void DOS_CALL dos_signal(DosQObject *vptr, const char *signal, const cha
|
|||
|
||||
DOS_API DosQNetworkConfigurationManager *DOS_CALL dos_qncm_create();
|
||||
|
||||
DOS_API char * DOS_CALL dos_plain_text(char* htmlString);
|
||||
|
||||
DOS_API void DOS_CALL dos_qncm_delete(DosQNetworkConfigurationManager *vptr);
|
||||
|
||||
DOS_API char * DOS_CALL dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath);
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtGui/QColorSpace>
|
||||
#include <QtGui/QTextDocumentFragment>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QUuid>
|
||||
#include <QtQml/QQmlApplicationEngine>
|
||||
|
@ -1118,6 +1119,11 @@ void dos_qncm_delete(::DosQNetworkConfigurationManager *vptr)
|
|||
delete ncm;
|
||||
}
|
||||
|
||||
char *dos_plain_text(char* htmlString)
|
||||
{
|
||||
return convert_to_cstring(QTextDocumentFragment::fromHtml( htmlString ).toPlainText().toUtf8());
|
||||
}
|
||||
|
||||
char *dos_image_resizer(char* imagePath, int maxSize, char* tmpDirPath)
|
||||
{
|
||||
QImage img(imagePath);
|
||||
|
|
Loading…
Reference in New Issue