Skip to content

Remove redundant type="text/javascript" from script tags#5492

Closed
RamiNoodle733 wants to merge 1 commit intoplotly:mainfrom
RamiNoodle733:fix-remove-script-type
Closed

Remove redundant type="text/javascript" from script tags#5492
RamiNoodle733 wants to merge 1 commit intoplotly:mainfrom
RamiNoodle733:fix-remove-script-type

Conversation

@RamiNoodle733
Copy link
Copy Markdown

This PR removes the redundant "type=text/javascript" attribute from script tags in HTML output, as it is unnecessary in HTML5 and causes validator warnings.

Changes:

  • Updated plotly/io/_html.py
  • Updated plotly/offline/offline.py
  • Updated plotly/io/_base_renderers.py
  • Updated corresponding tests

Fixes #5449

The HTML5 spec explicitly discourages setting type="text/javascript"
as it is the default for script tags. This change removes the redundant
type attribute to comply with HTML5 best practices and avoid validator
warnings.

Fixes #5449
@RamiNoodle733 RamiNoodle733 closed this by deleting the head repository Feb 7, 2026
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.

[FEATURE]: skip type="text/javascript" attribute in <script> tag of HTML output

2 participants