Currently you are forced to enter replacement text, but it would be good if it were possible to replace words with nothing.

You can do this in a hacky way by having the replacement word for individual word entries set to a space.

However the Default word replacement will not accept a space in the same way.

Comments

justingeeslin’s picture

Hi,

That is a good point! It turns out that System module processes that form and it will not allow a field to be empty.

A solution is to set the Default word replacement to be :   (HTML Entity for a non-breaking space)

This is not considered an empty string and it will be rendered as a space in the browser.

rooby’s picture

The only problem with that is your content could end up with strange spacing between words when using non breaking spaces.

jaydub’s picture

Assigned: Unassigned » jaydub
Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new2.25 KB

Implementing this using the same method used in Drupal core blocks configuration - use the string '<none>' to set as empty string.

jaydub’s picture

For the moment this still may leave stray spaces around the replaced word. Changes in the regex in issue #883940: Standalone doesn't count for first/last word of sentence or word repetition may resolve this.

  • Commit 0f7f70c on 7.x-1.x by jaydub:
    Issue #1468200 by jaydub: Allow empty string as replacement string.
    
jaydub’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.