[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:22:01 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=fccbdb5
The following commit has been merged in the master branch:
commit fccbdb5febcd2b0379574a539453da5ce51d2327
Author: Lasath Fernando <kde at lasath.org>
Date: Mon Jun 25 10:40:17 2012 +1000
Create a unit test for EscapeFitler
None of the existing tests failed when I removed EscapeFilter, so
I added a new one that checks that input is escaped properly.
---
tests/message-processor-basic-tests.cpp | 5 +++++
tests/message-processor-basic-tests.h | 1 +
2 files changed, 6 insertions(+)
diff --git a/tests/message-processor-basic-tests.cpp b/tests/message-processor-basic-tests.cpp
index bbd6c83..554ce1a 100644
--- a/tests/message-processor-basic-tests.cpp
+++ b/tests/message-processor-basic-tests.cpp
@@ -157,6 +157,11 @@ void MessageProcessorBasicTests::testImageEmbedGIF()
compare(message, imgTag);
}
+void MessageProcessorBasicTests::testXSS()
+{
+ compare("<script>alert('ha!');</script>", "<script>alert('ha!');</script>");
+}
+
QTEST_MAIN(MessageProcessorBasicTests);
#include "moc_message-processor-basic-tests.cpp"
\ No newline at end of file
diff --git a/tests/message-processor-basic-tests.h b/tests/message-processor-basic-tests.h
index 2f5d2fe..35f931f 100644
--- a/tests/message-processor-basic-tests.h
+++ b/tests/message-processor-basic-tests.h
@@ -47,6 +47,7 @@ private Q_SLOTS:
void testStrikethrough();
void testBold();
void testImageEmbedGIF();
+ void testXSS();
};
#endif // MESSAGE_PROCESSOR_BASIC_TESTS_H
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list