Javascript reserved words and Glossary "overlinking"

Re: Javascript reserved words and Glossary "overlinking"

by Shane Elliott -
Number of replies: 0
Picture of Core developers Picture of Plugin developers
Ok, we're finally sorting this out.
  1. The linking filters (glossary, resource, activity, wiki) will now ignore the head section ie everything between <head></head>
  2. The filters will still search within the <script></script> tags if they appear within the body. The reason for this, is that someone may post code to a forum or within a course (on Javascript maybe) where they want the linking to be performed.
  3. You can always stop the filters from working on uploaded files by toggling the setting in Administration->Configuration->Filters->Filter Uploaded Files
  4. Finally as a last resort, your javascript should be enclosed within <!-- --> ie
    <script type="text/javascript" language="javascript">
    <!--
    // some javascript in here
    -->
    </script>
    As long as the symbol ">" doesn't appear within the tags, the filters will treat <!-- ... --> as one big tag and ignore it. Not an ideal solution but it may help if you wish to use script within the page body.

If you are updating your code to test it, I suggest updating the whole module at a time as some of the changes are in files other than filter.php

Update: Only the glossary filter will ignore head at present as we're reworking the way some of the filters work to make them more efficient.