| @@ -10,8 +10,9 @@ | ||
| 10 | 10 | if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly |
| 11 | 11 | |
| 12 | 12 | global $post, $property; |
| 13 | 13 | |
| 14 | +// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template-local variable; the template is included through a helper/function scope, so PrefixAllGlobals misclassifies the file when checked standalone. | |
| 14 | 15 | $summary = get_the_excerpt(); |
| 15 | 16 | |
| 16 | 17 | if ( $summary != '' ) |
| 17 | 18 | { |
| @@ -17,12 +18,12 @@ | ||
| 17 | 18 | { |
| 18 | 19 | ?> |
| 19 | 20 | <div class="summary"> |
| 20 | 21 | |
| 21 | - <h4><?php _e( 'Property Summary', 'propertyhive' ); ?></h4> | |
| 22 | + <h4><?php echo esc_html(__( 'Property Summary', 'propertyhive' )); ?></h4> | |
| 22 | 23 | |
| 23 | - <div class="summary-contents"><?php echo nl2br($summary); ?></div> | |
| 24 | + <div class="summary-contents"><?php echo wp_kses_post( apply_filters('propertyhive_summary_description_nl2br', true) ? ph_nl2br($summary) : $summary ); ?></div> | |
| 24 | 25 | |
| 25 | 26 | </div> |
| 26 | 27 | <?php |
| 27 | 28 | } |
| 28 | 29 | ?> |