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-10969 Trim URLs #854

Merged
merged 12 commits into from
Nov 29, 2024
Merged

UHF-10969 Trim URLs #854

merged 12 commits into from
Nov 29, 2024

Conversation

khalima
Copy link
Contributor

@khalima khalima commented Nov 27, 2024

UHF-10969

What was done

  • Updated social media facebook share URL to use https protocol.
  • Trim the social media api url before setting it as a new share URL.
  • Trim the link href values when user submits the CKEditor link dialog window.
  • Trim the link href value during upcast, before any other processing has been done.
    • Note: In CKEditor 5, downcast converts the editor's model data into a view (e.g., rendering HTML for display), while upcast converts input content from the view (e.g., pasted HTML) into the editor's model representation.
  • Set the helfi link plugin priority to highest.
    • This will ensure that the helfi link plugin will handle the attributes first. There is still a risk of race condition with the linkit plugin.

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the Helfi Platform config
    • composer require drupal/helfi_platform_config:dev-UHF-10969
  • Run make drush-updb drush-cr

How to test

  • Check the social media links (f.e. News items in front page) and check that the social media links don't have spaces in them.
  • Check that the Helfi TPR module tests pass.
    • You can also test all TPR links (URLs, emails, telephone numbers) manually if you prefer 😇
  • In CKEditor, Test to add mailto, tel and normal URL with extra spaces in the end of the address (f.e. <-- non breaking space, <-- normal space, %20)
    • Ask for a list of obscure links from @khalima and test to copy + paste them to CKEditor source
  • Check that code follows our standards

Other PRs

Copy link
Contributor

@teroelonen teroelonen left a comment

Choose a reason for hiding this comment

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

This is fantastic work 🦖

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