Bug fix - Broken Links & HTML Artifacts in Message to Client #932#942
Open
ruwinirathnamalala wants to merge 5 commits intobuerokratt:devfrom
Open
Bug fix - Broken Links & HTML Artifacts in Message to Client #932#942ruwinirathnamalala wants to merge 5 commits intobuerokratt:devfrom
ruwinirathnamalala wants to merge 5 commits intobuerokratt:devfrom
Conversation
| const parts = value.split('_'); | ||
|
|
||
| // Check if the last part is a number | ||
| const lastPart = parts[parts.length - 1]; |
Collaborator
Author
There was a problem hiding this comment.
This Sonar suggestion cant be done as it will fail existing behavior
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


#932
This fix includes a change in Buerokratt-Chatbot also.
PR in chatbot: buerokratt/Buerokratt-Chatbot#1826
...............................................................................................................................................................
This pull request introduces improvements to how HTML content and links are handled and displayed in bot messages, step nodes, and chat components. It adds robust HTML entity decoding, sanitizes HTML to prevent unsafe content, and ensures links are properly converted and styled. These changes enhance security, readability, and user experience across the interface.
HTML Decoding and Sanitization Enhancements:
decodeHtmlEntitiesutility instring-util.tsto reliably decode HTML entities, used throughout the codebase for safer and clearer text rendering.StepNode(StepNode.tsx) to decode and sanitize HTML content before rendering, allowing only safe tags and attributes. [1] [2]service-builder.tsto decode HTML entities before converting to markdown, improving accuracy and safety. [1] [2]Link Handling and Markdown Conversion:
htmlLinkToMarkdowninMarkdowify/index.tsxto convert HTML<a>tags into markdown links, ensuring consistent formatting and safer rendering in bot messages. [1] [2]UI and Styling Improvements:
chat.module.scssto improve link visibility, including custom colors for regular and visited links, and improved text contrast. [1] [2]Bot Message Rendering:
<p>tags.Backend Template Update:
bot_responses_to_messages.handlebars) to escape quotes and filter control characters for safer and more reliable message content.