Back to LanguageTool Homepage - Privacy - Imprint

CSS code appears in textarea on the first search

I am running the LT server via systemd.

/etc/systemd/system/languagetool.service

[Unit]
Description=LanguageTool Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/java -cp /opt/LanguageTool/languagetool-server.jar org.languagetool.server.HTTPServer --port 8081 --allow-origin "*" --languageModel /mnt/languagetool-volume/languagetool-ngrams
User=www-data
WorkingDirectory=/opt/LanguageTool
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target

My HTML code is basically standard.

index.html

<!DOCTYPE html>
<html>
<head>
  <title>Language Analysis App</title>
</head>
<body>
  <form name="checkform" action="http://community.languagetool.org" method="post">

    <p id="checktextpara">
        <textarea id="checktext" name="text" style="width: 100%"
          rows="6">Paste your own text here... or check check this text.</textarea>
    </p>

    <div>
        <select name="lang" id="lang">
            <option value="en-US">English</option>
            <option value="de-DE">German</option>
            <option value="it">Italian</option>
        </select>
        <input type="submit" name="_action_checkText"
            value="Check Text" onClick="doit();return false;"> Powered by <a href="https://languagetool.org">languagetool.org</a>
        <div id="feedbackErrorMessage" style="color: red;"></div>
    </div>

  </form>

  <!-- jQuery CDN -->
  <script type="text/javascript"
      src="https://www.languagetool.org/js/jquery-1.7.0.min.js"></script>
  <!-- LanguageTool TinyMCE CDN -->
  <script type="text/javascript"
      src="https://www.languagetool.org/online-check/tiny_mce/tiny_mce.js"></script>
  <!-- LanguageTool TinyMCE Editor Slim CDN -->
  <script type="text/javascript"
      src="https://www.languagetool.org/online-check/tiny_mce/plugins/atd-tinymce/editor_plugin2.js">        </script>

  <!-- LanguageTool configuration -->
  <script language="javascript" type="text/javascript">
    tinyMCE.init({
       mode : "textareas",
       plugins : "AtD,paste",
       paste_text_sticky : true,
       setup : function(ed) {
           ed.onInit.add(function(ed) {
           ed.pasteAsPlainText = true;
       });
   },
   /* translations: */
   languagetool_i18n_no_errors : {
       // "No errors were found.":
       "de-DE": "Keine Fehler gefunden."
   },
   languagetool_i18n_explain : {
       // "Explain..." - shown if there is an URL with a detailed description:
       "de-DE": "Mehr Informationen..."
   },
   languagetool_i18n_ignore_once : {
       // "Ignore this error":
       "de-DE": "Hier ignorieren"
   },
   languagetool_i18n_ignore_all : {
       // "Ignore this kind of error":
       "de-DE": "Fehler dieses Typs ignorieren"
   },
   languagetool_i18n_rule_implementation : {
       // "Rule implementation":
       "de-DE": "Implementierung der Regel"
   },

   languagetool_i18n_current_lang :
       function() { return document.checkform.lang.value; },
       /* The URL of your LanguageTool server.
       If you use your own server here and it's not running on the same domain
       as the text form, make sure the server gets started with '--allow-origin ...'
       and use 'https://your-server/v2/check' as URL: */
       languagetool_rpc_url                 : "https://languagetool.org/api/v2/check",
       /* edit this file to customize how LanguageTool shows errors: */
       languagetool_css_url :
       "https://www.languagetool.org/online-check/" +
       "tiny_mce/plugins/atd-tinymce/css/content.css",
       /* this stuff is a matter of preference: */
       theme                              : "advanced",
       theme_advanced_buttons1            : "",
       theme_advanced_buttons2            : "",
       theme_advanced_buttons3            : "",
       theme_advanced_toolbar_location    : "none",
       theme_advanced_toolbar_align       : "left",
       theme_advanced_statusbar_location  : "bottom",
       theme_advanced_path                : false,
       theme_advanced_resizing            : true,
       theme_advanced_resizing_use_cookie : false,
       gecko_spellcheck                   : false
    });

        function doit() {
           var langCode = document.checkform.lang.value;
           tinyMCE.activeEditor.execCommand("mceWritingImprovementTool", langCode);
    }
  </script>
</body>
</html>

For some reason, upon executing the first search after reloading the page, the following text from a stylesheet is rendered inside the textarea:

Paste your own text here... or check check this text. 



<feColorMatrix type="matrix" values="0.1135 0.8905 -0.0019 0 -0.0021
0.1130 0.8865 0.0002 0 0.0003
0.0017 -0.0017 1 0 0
0 0 0 1 0
">




<feColorMatrix type="matrix" values="0.2936 0.7096 -0.0015 0 -0.0017
0.2923 0.7064 0.0006 0 0.0007
-0.0231 0.0232 0.9999 0 0
0 0 0 1 0
"> 




<feColorMatrix type="matrix" values="0.95 0.05 0 0 0
0 0.433 0.567 0 0
0 0.475 0.525 0 0
0 0 0 1 0
">


/*
Copyright (c) 2016 Interaktiva rum Sverige (Interactive rooms Sweden)

Website: http://www.interaktivarum.se/en

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and     associated documentation files (the "Software"), to deal in the Software without restriction, including     without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell         copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to         the following conditions:
    
    The above copyright notice and this permission notice shall be included in all copies or substantial     portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR     IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,     FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE     AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER     LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,     OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN     THE SOFTWARE.
*/

/*
The color filters are defined in external SVG file rgblind.svg, located in same folder as this CSS file.
Use this CSS file when injecting both the CSS style rules and the SVG filters into the HTML document.
*/

.protanopia{
filter: url('#protanopia');
-webkit-filter: url('#protanopia');
color-interpolation-filters:sRGB; 
}

.deuteranopia{
filter: url('#deuteranopia');
-webkit-filter: url('#deuteranopia');
color-interpolation-filters:sRGB; 
}

This happens with both the current release and the snapshot mentioned here.

Even if I replace the default value of the textarea with my own custom text, these styles appear on the first execution. Once I clear the textarea and search again, only the text entered is displayed.

Worked out this is actually the stylesheet of ‘RGBlind’, a browser plugin which allows accessibility testing. For some reason it gets printed in the textarea.