- Sort Score
- Num 10 results
- Language All
Results 1 - 6 of 6 for sanitizeUrl (0.29 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/main/webapp/js/chat.js
messageElement.find('.message-wrapper').append(actionsHtml); } /** * Validates and sanitizes a URL to prevent javascript: and other dangerous protocols */ function sanitizeUrl(url) { if (!url || typeof url !== 'string') { return '#'; } var trimmedUrl = url.trim().toLowerCase(); // Allow http, https, and absolute path URLsCreated: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Mar 19 01:36:02 GMT 2026 - 30.6K bytes - Click Count (0) -
src/main/java/org/codelibs/fess/helper/MarkdownRenderer.java
import org.owasp.html.HtmlPolicyBuilder; import org.owasp.html.PolicyFactory; /** * Renders markdown to sanitized HTML for safe display in the chat interface. * Uses commonmark for markdown parsing and OWASP HTML Sanitizer for XSS prevention. */ public class MarkdownRenderer { private static final Logger logger = LogManager.getLogger(MarkdownRenderer.class); private Parser markdownParser;Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Mon Jan 12 10:32:40 GMT 2026 - 5.3K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/helper/MarkdownRendererTest.java
@Test public void test_render_xss_scriptTag() { String malicious = "<script>alert('XSS')</script>"; String result = markdownRenderer.render(malicious); // Script tags should be removed by sanitizer assertFalse(result.contains("<script>")); assertFalse(result.contains("</script>")); } @Test public void test_render_xss_onclickAttribute() {Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 11.1K bytes - Click Count (0) -
pom.xml
<artifactId>commonmark-ext-gfm-tables</artifactId> <version>0.24.0</version> </dependency> <dependency> <groupId>com.googlecode.owasp-java-html-sanitizer</groupId> <artifactId>owasp-java-html-sanitizer</artifactId> <version>20260101.1</version> </dependency> <!-- test --> <dependency> <groupId>org.junit.jupiter</groupId>
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Thu Mar 19 07:04:54 GMT 2026 - 49.9K bytes - Click Count (0) -
guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
* * Fundamentally, there's not really anything we can do about that. In the unlikely event that it * comes up in practice (maybe through some kind of sanitizer-like testing that intentionally * inflicts spurious interrupts on us?), we might have to accept some flakiness or disable some * tests, at least under whichever environment (JRE or Android) we see such problems. */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 38.1K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/UninterruptiblesTest.java
* * Fundamentally, there's not really anything we can do about that. In the unlikely event that it * comes up in practice (maybe through some kind of sanitizer-like testing that intentionally * inflicts spurious interrupts on us?), we might have to accept some flakiness or disable some * tests, at least under whichever environment (JRE or Android) we see such problems. */
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 38.1K bytes - Click Count (0)