Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UHF-8404: Blockquote attribute cleansing #519

Merged
merged 3 commits into from
May 30, 2023
Merged

UHF-8404: Blockquote attribute cleansing #519

merged 3 commits into from
May 30, 2023

Conversation

khalima
Copy link
Contributor

@khalima khalima commented May 26, 2023

UHF-8404

What was done

  • Added update hook to remove unwanted aria-label and role=region attributes from blockquote elements in long text fields.

Before installing

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Go to edit some page with text paragraph
  • Create a "broken" blockquote element manually
<blockquote aria-label="Quote" class="quote" role="region"><p class="quote__text">This is quote text</p>
<footer class="quote__author"><cite>Your name</cite></footer></blockquote>
  • Save the page

How to install

  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-8404
  • Run make drush-updb drush-cr

How to test

  • Go to that page you've created and check that the markup for the broken blockquote is some what like this
<blockquote class="quote"><p class="quote__text">This is quote text</p>
<footer class="quote__author"><cite>Your name</cite></footer></blockquote>
  • Check the code

@dire dire self-requested a review May 30, 2023 04:38
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@dire dire left a comment

Choose a reason for hiding this comment

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

Works nicely and looks good now! 🚀

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.

2 participants