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

PLATFORM-4908 Add ParserAllowExternalImage hook into mediawiki upstream repository #22

Open
wants to merge 2 commits into
base: REL1_33_6-FANDOM
Choose a base branch
from

Conversation

mmeller-wikia
Copy link

@@ -97,7 +97,9 @@ class Parser {
# RegExp to make image URLs (embeds IPv6 part of EXT_LINK_ADDR)
// phpcs:ignore Generic.Files.LineLength
const EXT_IMAGE_REGEX = '/^(http:\/\/|https:\/\/)((?:\\[(?i:[0-9a-f:.]+)\\])?[^][<>"\\x00-\\x20\\x7F\p{Zs}\x{FFFD}]+)
\\/([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg)$/Sxu';
\\/((([A-Za-z0-9_.,~%\\-+&;#*?!=()@\\x80-\\xFF]+)\\.((?i)gif|png|jpg|jpeg|webp|ico|svg))|
([0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{12})(\\/|\\?|$))
Copy link
Author

Choose a reason for hiding this comment

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

I don't think they will agree to add this line to upstream (allow to hotlink static assets like https://static.fandom-dev.pl/13baa06b-d6eb-48fb-a75a-25afa0d37929/thumbnail/width/348/height/348 )

@mszabo-wikia
Copy link

Looks like upstream review suggests it's OK to patch the regex in core to accept query parameters...(https://gerrit.wikimedia.org/r/c/mediawiki/core/+/663183)

@maaartyyynaa
Copy link
Member

Looks like upstream review suggests it's OK to patch the regex in core to accept query parameters...(https://gerrit.wikimedia.org/r/c/mediawiki/core/+/663183)

Yeah, I've created a patch and we are waiting for review

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