You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2018/09/16 10:10:30 UTC

[GitHub] based2 closed pull request #194: MIME type for javascript is now officially application/javascript

based2 closed pull request #194: MIME type for javascript is now officially application/javascript
URL: https://github.com/apache/maven-surefire/pull/194
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
index f9b948091..33196a600 100644
--- a/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
+++ b/maven-surefire-report-plugin/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportGenerator.java
@@ -78,9 +78,9 @@ public void doGenerateReport( LocalizedProperties bundle, Sink sink )
         sink.body();
 
         SinkEventAttributeSet atts = new SinkEventAttributeSet();
-        atts.addAttribute( TYPE, "text/javascript" );
+        atts.addAttribute( TYPE, "application/javascript" );
         sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_START }, atts );
-        sink.unknown( "cdata", new Object[]{ HtmlMarkup.CDATA_TYPE, javascriptToggleDisplayCode() }, null );
+        sink.unknown( "pcdata", new Object[]{ HtmlMarkup.PCDATA_TYPE, javascriptToggleDisplayCode() }, null );
         sink.unknown( "script", new Object[]{ HtmlMarkup.TAG_TYPE_END }, null );
 
         sink.section1();
@@ -745,8 +745,8 @@ private static void sinkLink_( Sink sink )
     private static String javascriptToggleDisplayCode()
     {
 
-        // the javascript code is emitted within a commented CDATA section
-        // so we have to start with a newline and comment the CDATA closing in the end
+        // the javascript code is emitted within a commented PCDATA section
+        // so we have to start with a newline and comment the PCDATA closing in the end
 
         return "\n" + "function toggleDisplay(elementId) {\n"
                 + " var elm = document.getElementById(elementId + '-error');\n"


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services