<commit_before>.media_content_update
  - if @project.updates.empty?
    em = t('projects.project_updates.empty')
  - else
    ul.collection_list
      - for update in @project.updates.order('created_at DESC')
        li
          .time= l(update.created_at, :format => :updates)
          h3= link_to "#updates/#{update.id}", :id => "updates/#{update.id}" do
            = update.title
          .comment= raw(update.comment_html)
          .midia
            .social
              .update_share
                .twitter_share= render 'projects/twitter'
                - if @project.permalink
                  .facebook_share= render 'projects/facebook', :href => project_by_slug_url(@project.permalink, :update_id => update.id, :locale => I18n.locale), :width => '360'
                  - else
                  .facebook_share= render 'projects/facebook', :href => project_url(@project, :update_id => update.id, :locale => I18n.locale), :width => '360'
          - if current_user and @project.user == current_user || can?(:manage, Update)
            = link_to t('projects.project_updates.destroy'), project_update_path(:project_id => @project.id, :id => update.id), :confirm => t('projects.project_updates.destroy_confirmation'), :remote => true, :method => :delete, :class => 'destroy_update'
            .deleting_update.hide= image_tag "loading.gif"

<commit_msg>fixed remove update only for project owner. Need to fix some security issues before opening to admin<commit_after>.media_content_update
  - if @project.updates.empty?
    em = t('projects.project_updates.empty')
  - else
    ul.collection_list
      - for update in @project.updates.order('created_at DESC')
        li
          .time= l(update.created_at, :format => :updates)
          h3= link_to "#updates/#{update.id}", :id => "updates/#{update.id}" do
            = update.title
          .comment= raw(update.comment_html)
          .midia
            .social
              .update_share
                .twitter_share= render 'projects/twitter'
                - if @project.permalink
                  .facebook_share= render 'projects/facebook', :href => project_by_slug_url(@project.permalink, :update_id => update.id, :locale => I18n.locale), :width => '360'
                  - else
                  .facebook_share= render 'projects/facebook', :href => project_url(@project, :update_id => update.id, :locale => I18n.locale), :width => '360'
          - if current_user and @project.user == current_user
            = link_to t('projects.project_updates.destroy'), project_update_path(:project_id => @project.id, :id => update.id), :confirm => t('projects.project_updates.destroy_confirmation'), :remote => true, :method => :delete, :class => 'destroy_update'
            .deleting_update.hide= image_tag "loading.gif"


{'fraction_non_alphanumeric': 0.1368496079828938, 'fraction_numerical': 0.007840342124019958, 'mean_word_length': 2.6126126126126126, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, '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': '4419279', 'n_tokens_mistral': 843, 'n_tokens_neox': 820, 'n_words': 176}