Skip to content

Commit

Permalink
fix: specify charset utf-8 in html script declaration (#6278)
Browse files Browse the repository at this point in the history
ref: #5311
  • Loading branch information
ishaigor committed Jul 31, 2020
1 parent 22668ee commit d7d166d
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions dev-helpers/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<body>
<div id="swagger-ui"></div>

<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
Expand Down
4 changes: 2 additions & 2 deletions dist/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
<body>
<div id="swagger-ui"></div>

<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
// Begin Swagger UI call region
Expand Down
4 changes: 2 additions & 2 deletions docs/usage/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ For more information on controlling Swagger UI through the Docker image, see the
You can embed Swagger UI's code directly in your HTML by using unpkg's interface:

```html
<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js" charset="UTF-8"></script>
<!-- `SwaggerUIBundle` is now available on the page -->
```

See [unpkg's main page](https://unpkg.com/) for more information on how to use unpkg.

### Static files without HTTP or HTML

Once swagger-ui has successfully generated the `/dist` directory, you can copy this to your own file system and host from there.
Once swagger-ui has successfully generated the `/dist` directory, you can copy this to your own file system and host from there.
4 changes: 2 additions & 2 deletions test/e2e-cypress/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

<div id="swagger-ui"></div>

<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
Expand Down
6 changes: 3 additions & 3 deletions test/e2e-cypress/static/pages/5138/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

<div id="swagger-ui"></div>

<script src="/swagger-ui-bundle.js"> </script>
<script src="/swagger-ui-standalone-preset.js"> </script>
<script src="/swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="/swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function () {
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
Expand Down Expand Up @@ -73,4 +73,4 @@
</script>
</body>

</html>
</html>
4 changes: 2 additions & 2 deletions test/e2e-selenium/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@

<div id="swagger-ui"></div>

<script src="./swagger-ui-bundle.js"> </script>
<script src="./swagger-ui-standalone-preset.js"> </script>
<script src="./swagger-ui-bundle.js" charset="UTF-8"> </script>
<script src="./swagger-ui-standalone-preset.js" charset="UTF-8"> </script>
<script>
window.onload = function() {
window["SwaggerUIBundle"] = window["swagger-ui-bundle"]
Expand Down

0 comments on commit d7d166d

Please sign in to comment.