openedx / course-discovery

Service providing access to consolidated course and program metadata
https://edx-discovery.readthedocs.io/en/latest/
GNU Affero General Public License v3.0
57 stars 171 forks source link

fix: avoid span tags overlapping #4330

Closed Ali-D-Akbar closed 5 months ago

Ali-D-Akbar commented 5 months ago

PROD-4016 Updates the logic to avoid adding multiple span tags around span tags after each time handle_tag is called for one of the richtext fields on Publisher. Filters out extra span tags as well.

It used to add extra span tags for a richtext having dir="rtl" like this: '<p dir="rtl"><span lang="en"><span lang="en">lang and class</span></span></p>' And after any subsequent save call to any of the fields using it, it will multiply the span tags to something like: '<p dir="rtl"><span lang="en"><span lang="en"><span lang="en">lang and class</span></span></span></p>'