RelevancyApp / utils.py
XINZHANG-Geotab's picture
init
2b4a9d2
container_emphasis_css = """
{
border: 5px solid rgba(128, 128, 128, 1);
border-radius: 0.5rem;
padding: 0em 1em 1em 0.5em;
background-color: rgba(0, 128, 0, 0.2);
overflow-wrap: break-word; /* Added to ensure long words break */
word-wrap: break-word; /* Added for compatibility with older browsers */
word-break: break-all; /* Added to handle breaking of long strings */
white-space: pre-wrap; /* Added to respect new lines and wrap text */
}
"""
container_regular_css = """
{
border: 5px solid rgba(0, 0, 0, 0.2);
border-radius: 0.5rem;
padding: 0em 1em 1em 0.5em;
background-color: rgba(255, 255, 255, 0);
overflow-wrap: break-word; /* Added to ensure long words break */
word-wrap: break-word; /* Added for compatibility with older browsers */
word-break: break-all; /* Added to handle breaking of long strings */
white-space: pre-wrap; /* Added to respect new lines and wrap text */
}
"""
question_font = """
<style>
.question-font {
font-size: 16px !important;
font-weight: bold;
font-family: 'Arial', sans-serif;
}
</style>
"""
def modify_sql_guid_injection(sql):
injected = "where UPPER(CompanyGuid) = '14A328EE-1ABF-448C-9F86-8D4E05838F8D')"
return sql.replace(injected, '\n' + injected)