!! Version 2 !! test Embed function should not render when it is disabled !! config wgExternalContentEnableEmbedFunction=false !! wikitext {{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md}} !! html
{{#embed:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md}}
!! end !! test Bitbucket function should not render when it is disabled !! config wgExternalContentEnableBitbucketFunction=false !! wikitext {{#bitbucket:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md}} !! html{{#bitbucket:raw.githubusercontent.com/ProfessionalWiki/ExternalContent/master/README.md}}
!! end !! test Embed function should display not found for non-existing files !! config wgLanguageCode="en" !! wikitext {{#embed:https://localhost/this-does-not-exist.md}} !! html !! end !! test Bitbucket function should show invalid URL error !! config wgLanguageCode="en" !! wikitext {{#bitbucket:https://localhost/not-a-valid-bitbucket-url.md}} !! html !! end !! test Files with extensions not in the whitelist should be rejected !! config wgExternalContentFileExtensionWhitelist=["md"] !! wikitext {{#embed:https://localhost/whatever.hax}} !! html !! end