fix: Remove circular depends
All checks were successful
Build Docker / Build Image (push) Successful in 47s
All checks were successful
Build Docker / Build Image (push) Successful in 47s
This commit is contained in:
20
render.py
20
render.py
@@ -3,7 +3,6 @@ import json
|
||||
import urllib.parse
|
||||
from flask import render_template
|
||||
from domainLookup import punycode_to_emoji
|
||||
from main import renderDomain
|
||||
import os
|
||||
|
||||
# Get Explorer URL
|
||||
@@ -349,4 +348,21 @@ def plugin_output_dash(outputs, returns):
|
||||
if outputs[returnOutput] == None:
|
||||
continue
|
||||
html += render_template('components/dashboard-plugin.html', name=returns[returnOutput]["name"], output=outputs[returnOutput])
|
||||
return html
|
||||
return html
|
||||
|
||||
|
||||
|
||||
def renderDomain(name: str) -> str:
|
||||
"""
|
||||
Render a domain name with emojis and other special characters.
|
||||
"""
|
||||
# Convert emoji to punycode
|
||||
try:
|
||||
rendered = name.encode("ascii").decode("idna")
|
||||
if rendered == name:
|
||||
return f"{name}/"
|
||||
return f"{rendered}/ ({name})"
|
||||
|
||||
|
||||
except Exception as e:
|
||||
return f"{name}/"
|
||||
|
||||
Reference in New Issue
Block a user