Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

API key instructions: preserve content around URLs (#1355)

Pierre7d147eb303df
diff --git a/spiderfoot/templates/opts.tmpl b/spiderfoot/templates/opts.tmpl
index 03f54b1b..e8d207e5 100644
--- a/spiderfoot/templates/opts.tmpl
+++ b/spiderfoot/templates/opts.tmpl
@@ -140,7 +140,7 @@
instructions = ""
for step in apiKeyInstructions:
if "https://" in step or "http://" in step:
- step = re.sub(r'.*(https?://.[^ ]+).*', '<a target=_new href=\'\\1\'>\\1</a>', step)
+ step = re.sub(r'(https?://.[^ ]+)', '<a target=_new href=\'\\1\'>\\1</a>', step)
instructions += f"<li>{step}</li>"
%>
&nbsp;&nbsp;<a href='#' data-html="true" data-toggle="popover" data-trigger="focus" title="Instructions" data-content="<ol>${instructions}</ol>"><i class="glyphicon glyphicon-question-sign"></i></a>