snoopdave commented on code in PR #221:
URL: https://github.com/apache/roller/pull/221#discussion_r4406598126


##########
app/src/main/java/org/apache/roller/weblogger/business/jpa/JPABookmarkManagerImpl.java:
##########
@@ -270,6 +285,26 @@ private void importOpmlElement(
         }
     }
 
+    /**
+     * Returns the value if it is an absolute http or https URL, else null.
+     */
+    static String webLinkOrNull(String value) {
+        if (value == null) {
+            return null;
+        }
+        try {
+            URI uri = new URI(value.trim());
+            String scheme = uri.getScheme();
+            if (scheme != null && uri.getHost() != null

Review Comment:
   🤖Claude: fixed by noting it in CHANGES.md: the entry now says the link must 
parse as a URI, and names host names with `_` and unencoded `|` or `{` as links 
that are skipped. I did not add the scheme-prefix fallback: a value that fails 
URI parsing is exactly the kind this check is meant to keep out of the 
bookmark, so the fallback would undo it. Docs-only change, no build needed. 
(Local change, in the next push.)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to