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

Do not leak unknown asset paths into HTML #3061

Merged
merged 3 commits into from Jul 7, 2023

Conversation

IgnatBeresnev
Copy link
Member

Fixes #3040

@@ -112,7 +112,11 @@ class DefaultTemplateModelFactory(val context: DokkaContext) : TemplateModelFact
it.isImage() -> link(href = if (it.isAbsolute) it else "$pathToRoot$it")
else -> null
}
} ?: it)
Copy link
Member Author

Choose a reason for hiding this comment

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

The bug was with ?: it

@@ -177,40 +177,6 @@ class PageTransformerBuilderTest : BaseAbstractTest() {
}
}

@Test
fun `should load script as defer if name ending in _deferred`() {
Copy link
Member Author

Choose a reason for hiding this comment

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

I wrote this test a while ago, and at the time I couldn't find a good place for it, but I think having it in ResourceLinksTest is better now, so I moved it there.

@IgnatBeresnev IgnatBeresnev merged commit 14cd0f3 into master Jul 7, 2023
11 checks passed
@IgnatBeresnev IgnatBeresnev deleted the 3040-do-not-leak-resources branch July 7, 2023 12:21
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.

Directory path of customAssets is being displayed on the main index page
2 participants