<commit_before>- content_for :header_tags do
  :javascript
    window.INITIAL_STATE = #{render(file: 'home/initial_state', formats: :json)}

  = javascript_include_tag 'application'

= react_component 'Mastodon', default_props, class: 'app-holder', prerender: false<commit_msg>Fix #457 - escape JSON in INITIAL_STATE (this bug only ever allowed a user to xss themselves rather than anyone else)<commit_after>- content_for :header_tags do
  :javascript
    window.INITIAL_STATE = #{json_escape(render(file: 'home/initial_state', formats: :json))}

  = javascript_include_tag 'application'

= react_component 'Mastodon', default_props, class: 'app-holder', prerender: false
{'fraction_non_alphanumeric': 0.11028315946348734, 'fraction_numerical': 0.004470938897168405, 'mean_word_length': 6.304347826086956, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '4014800', 'n_tokens_mistral': 214, 'n_tokens_neox': 198, 'n_words': 56}