wp-user-frontend icon indicating copy to clipboard operation
wp-user-frontend copied to clipboard

Removal of backslashes

Open johnyb0y opened this issue 2 years ago • 1 comments

Hello everyone,

currently UserFrontEnd Pro on post creation removes all backslashes in the post. This is probably done as sanitization measure.

For us this is frequently an annoyance, since we use UserFrontEnd Pro in our self-built internal Intranet and a lof of SMB network paths containing backslashes get mentioned in posts, and people would like to copy and paste them.

When posting via the backend, also using TinyMCE, the backslashes get replaced as HTML Unicode chars and not removed.

As an optional setting, could you please allow for a Unicode char replacement of backslashes instead of a complete removal.

This can be done as a TinyMCE config, something like this:

setup: function (editor) {
    editor.on('GetContent', function (e) {
        //character encoding for backslash
        e.content = e.content.replace(/\\/g, "\");
     });
}

Thank you.

johnyb0y avatar Nov 15 '22 11:11 johnyb0y

As a workaround I've now embedded a small conversion form in our post form: scr2

For us this is fine, but I'd still appreciate it, if you would fix this in general. Thank you.

johnyb0y avatar Nov 16 '22 11:11 johnyb0y