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

Mark external links with special class #1796

Merged
merged 1 commit into from
Nov 2, 2022

Conversation

charludo
Copy link
Contributor

Short description

This PR adds the class link-external to links inserted or updated with TinyMCE.

Proposed changes

  • check if link is external (i.e. does not contain integreat.app), if so, add extra class when inserting
  • re-check when updating the link, both through the main plugin modal and the inline popup

Side effects

  • none

Resolved issues

Fixes: #1333


Pull Request Review Guidelines

@charludo charludo requested a review from a team as a code owner October 25, 2022 14:48
@charludo charludo linked an issue Oct 25, 2022 that may be closed by this pull request
@codeclimate
Copy link

codeclimate bot commented Oct 25, 2022

Code Climate has analyzed commit 71ccd22 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 74.2% (0.0% change).

View more on Code Climate.

@svenseeberg svenseeberg self-requested a review October 26, 2022 14:21
Copy link
Member

@svenseeberg svenseeberg left a comment

Choose a reason for hiding this comment

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

The basic JS code works, thanks! However, we should mark more domains as supported.

@charludo charludo force-pushed the feature/mark-external-links branch 2 times, most recently from a945c29 to 3578fbe Compare October 28, 2022 09:27
Copy link
Member

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

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

Thanks, works as expected! 👍

CHANGELOG.md Outdated Show resolved Hide resolved
integreat_cms/core/settings.py Outdated Show resolved Hide resolved
integreat_cms/cms/templatetags/settings_tags.py Outdated Show resolved Hide resolved
integreat_cms/core/settings.py Outdated Show resolved Hide resolved
integreat_cms/core/settings.py Show resolved Hide resolved
Copy link
Member

@timobrembeck timobrembeck left a comment

Choose a reason for hiding this comment

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

Thanks! 🙏
Now, could you squash your commits again? 🙈

Copy link
Member

@svenseeberg svenseeberg 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 to me, thanks.

@charludo charludo merged commit d746126 into develop Nov 2, 2022
@charludo charludo deleted the feature/mark-external-links branch November 2, 2022 15:16
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.

Mark external links, phone numbers, etc.
3 participants