Skip to content

Conversation

@hentrymartin
Copy link
Collaborator

Related JIRA Ticket:

https://topcoder.atlassian.net/browse/PM-3398

What's in this PR?

  • Fixed QA feedbacks(Removed desc, skills in the work card of experience modal, made the profile page experience as single column instead of two column)
  • Converted description field to support rich text.

})
}

function handleDescriptionChange(value: string): void {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[❗❗ security]
The handleDescriptionChange function directly updates the formValues state with the new description value. Ensure that this function is only called with sanitized input to prevent potential XSS vulnerabilities, especially since the input is rich text.

tabIndex={0}
onChange={bind(handleFormValueChange, this, 'description')}
onChange={handleDescriptionChange}
toolbar='undo redo | formatselect | bold italic underline strikethrough | link | alignleft aligncenter alignright alignjustify | numlist bullist outdent indent | table | removeformat'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 design]
The toolbar configuration for FieldHtmlEditor includes several formatting options. Consider limiting the toolbar options to only those necessary for the application's use case to enhance user experience and reduce potential misuse.

</span>
)
})}
{props.work.associatedSkills.map((skillId: string) => props.skillNamesMap?.[skillId] || skillId).join(', ')}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[💡 maintainability]
The use of Array.prototype.map followed by join(', ') is correct but could be more readable if extracted into a separate function or variable. This would improve maintainability and readability by clearly separating the transformation logic from the rendering logic.

dangerouslySetInnerHTML={{
__html: DOMPurify.sanitize(props.work.description, {
ALLOWED_ATTR: ['href', 'target', 'rel'],
ALLOWED_TAGS: ['p', 'br', 'strong', 'em', 'u', 's', 'strike', 'ul', 'ol', 'li', 'a'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[⚠️ design]
Adding 's' and 'strike' to the ALLOWED_TAGS list is technically correct, but be cautious as these tags are often used for strikethrough text, which could be misleading or misused in user-generated content. Ensure that this change aligns with the intended use case and consider any potential implications on content clarity or user experience.

Copy link
Collaborator

@kkartunov kkartunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@kkartunov kkartunov merged commit 8f106a8 into dev Jan 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants