Commits

ncrocfer committed b338330

Added filters for security reasons

  • Participants
  • Parent commits 09b1b93

Comments (0)

Files changed (2)

File includes/bp-portfolio-filters.php

+<?php
+
+/**
+ * Encode HTML tags for security reasons
+ */
+add_filter( 'bp_portfolio_data_title_before_save', 'esc_attr', 1 );
+add_filter( 'bp_portfolio_data_description_before_save', 'esc_attr', 1 );
+add_filter( 'bp_portfolio_data_url_before_save', 'esc_attr', 1 );
+
+
+/**
+ * Inserts newlines for the description field 
+ */
+add_filter( 'bp_portfolio_get_item_description', 'nl2br', 1 );
+
+?>

File includes/bp-portfolio-loader.php

         $includes = array(
             'includes/bp-portfolio-actions.php',
             'includes/bp-portfolio-screens.php',
-//            'includes/bp-portfolio-filters.php',
+            'includes/bp-portfolio-filters.php',
             'includes/bp-portfolio-classes.php',
             'includes/bp-portfolio-activity.php',
             'includes/bp-portfolio-functions.php',