Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/06/2018 10:47:08 AM (6 years ago)
Author:
imath
Message:

BP Nouveau: restrict the allowed HTML tags for Messages.

BP Nouveau is using the WP Editor to improve the user experience of the Messages component when people are writing a new message or replying to a thread. So far allowed HTML tags for the messages content *when BP Nouveau is the active template pack* were the same than WordPress Posts. When BP Nouveau is not the active template pack, the allowed tags are those of the WordPress global .

This commit is introducing a new function that is used to filter the allowed HTML tags for activity content and message content. It extends the with new tags (img, span, ul, ol & li) and leaves specific functions to the 2 components to include filters so that it is possible to restrict/extend allowed HTML tags for both content types or one of them. It also restricts the WP Editor available buttons when used into the BP Nouveau Messages UI so that they are consistent with the allowed HTML tags.

Props DJPaul

Fixes #7795

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-nouveau/sass/_nouveau_messages.scss

    r12041 r12067  
    193193
    194194        .preview-message {
    195             clear: both;
     195            overflow: hidden;
    196196        }
    197197
     
    264264
    265265        .message-content {
    266             clear: both;
     266            overflow: hidden;
    267267            margin: 1em auto 0;
    268268            width: 90%;
Note: See TracChangeset for help on using the changeset viewer.