docsify icon indicating copy to clipboard operation
docsify copied to clipboard

`<script>` in the md file fetched from the basePath is not executed

Open b6pzeusbc54tvhw5jgpyw8pwz2x6gs opened this issue 4 years ago • 0 comments

Bug Report

<script>// my script</script> in md file from basePath is not executed.

Steps to reproduce

  • Provide the basePath as a full url with a domain different from the domain of index.html.
  • open url of index.html with your browser.
  • When you fetch the md files from basePath, you can check that the script in the md file cannot be executed.

What is current behaviour

In this case, the value of isRemoteUrl is determined to be true, so the

https://github.com/docsifyjs/docsify/blob/c3cdadc37137edcd9e219359973902d2fc8b66ff/src/core/render/index.js#L332-L334

What is the expected behaviour

basePath is a value that can be entered only with the authority of the document site administrator, and the basePath server can also be considered owned by the administrator, so the isRemoteUrl value should be false.

Other relevant information

  • [ ] Bug does still occur when all/other plugins are disabled?

  • Your OS: macOS 11

  • Node.js version:

  • npm/yarn version:

  • Browser version:

  • Docsify version: 4.12.1

  • Docsify plugins: