<commit_before>%begin_globals_get_embed^eq:true%
%begin_globals_get^contains:SQ_ASSET_CONTENTS%
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <!--@@ Workaround for https://github.com/jcu-eresearch/matrix-helpers/issues/53 @@-->
  <!--@@ Change to src="./?a= 1234" when that issue is fixed @@-->
  <script runat="server" id="lodash.min.js">
    %globals_asset_file_contents:389796%
  </script>
  <script runat="server" id="ssjs-setup.js">
    %globals_asset_file_contents:391595%
  </script>

  <!--@@ JCU Web Framework CSS @@-->
  <link rel="stylesheet" href="https://cdn.jcu.edu.au/1.0.0-beta.1/css/jcu.min.css" integrity="<KEY>" crossorigin="anonymous">

  <!--@@ explore.min.css @@-->
  <link href="%globals_asset_url:280407%?v=%globals_asset_version:280407%" rel="stylesheet">

  <!--@@ Site custom CSS @@-->
  %globals_asset_contents:293185%

  <!--@@ 'Explore' Design custom CSS @@-->
  %globals_asset_contents:294071%
</head>
<body>
%end_globals%
%end_globals%

<!--@@ Opening wrapper element for all Content Container Templates @@-->
<script runat="server">var parts = JCU.extractContentContainerParts("%asset_contents^json_encode%")</script>
<script runat="server">
  if (JCU.debug) {
    print('<!-- Opening tag for %asset_assetid% -->')
  }
  print(parts.opening) //Hack for #72: %asset_assetid%
</script>
<commit_msg>Escape % chars when loading asset_contents in SSJS<commit_after>%begin_globals_get_embed^eq:true%
%begin_globals_get^contains:SQ_ASSET_CONTENTS%
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

  <!--@@ Workaround for https://github.com/jcu-eresearch/matrix-helpers/issues/53 @@-->
  <!--@@ Change to src="./?a= 1234" when that issue is fixed @@-->
  <script runat="server" id="lodash.min.js">
    %globals_asset_file_contents:389796%
  </script>
  <script runat="server" id="ssjs-setup.js">
    %globals_asset_file_contents:391595%
  </script>

  <!--@@ JCU Web Framework CSS @@-->
  <link rel="stylesheet" href="https://cdn.jcu.edu.au/1.0.0-beta.1/css/jcu.min.css" integrity="<KEY>" crossorigin="anonymous">

  <!--@@ explore.min.css @@-->
  <link href="%globals_asset_url:280407%?v=%globals_asset_version:280407%" rel="stylesheet">

  <!--@@ Site custom CSS @@-->
  %globals_asset_contents:293185%

  <!--@@ 'Explore' Design custom CSS @@-->
  %globals_asset_contents:294071%
</head>
<body>
%end_globals%
%end_globals%

<!--@@ Opening wrapper element for all Content Container Templates @@-->
<script runat="server">
  // Asset 650163's name is a percent sign, which opens Matrix keyword
  // replacements. We escape those here so we can retain any nested
  // keywords until our final print of parts.innerHTML. This avoids
  // accidental code injection.
  var parts = JCU.extractContentContainerParts("%asset_contents^json_encode^replace:{globals_asset_name:650163}:&percnt;%")
  parts.innerHTML = parts.innerHTML.replace(/&percnt;/g, '%')
</script>
<script runat="server">
  if (JCU.debug) {
    print('<!-- Opening tag for %asset_assetid% -->')
  }
  print(parts.opening) //Hack for #72: %asset_assetid%
</script>

{'fraction_non_alphanumeric': 0.18851731281444215, 'fraction_numerical': 0.033145901154187626, 'mean_word_length': 4.837651122625216, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 57, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4889928', 'n_tokens_mistral': 1294, 'n_tokens_neox': 1175, 'n_words': 228}