Detect and replace the   character

webadmin's Avatar


30 Jun, 2016 04:41 PM

I'm trying to do a word count based on splitting with the space character. That seems to work fine, but the problem is, Cascade seems to replace the normal space with "&#160" when I do a copy and paste of a space character. My code isn't detecting that character as a space, and I can't seem to use the replace command to remove it. How do I get rid of this character?

  1. 1 Posted by Ryan Griffith on 07 Jul, 2016 06:32 PM

    Ryan Griffith's Avatar


    How are you implementing the word count? Are you doing this client-side with JavaScript, or using a Format? If you can provide sample code and XML from a page for context that would be very helpful.


  2. 2 Posted by webadmin on 07 Jul, 2016 07:47 PM

    webadmin's Avatar

    Sorry... I'm once again an idiot. I see my mistake. I was assigning the output of the replace function to the wrong variable.

  3. 3 Posted by Ryan Griffith on 07 Jul, 2016 08:05 PM

    Ryan Griffith's Avatar

    No worries, thank you for following up! I'm going to go ahead and close this discussion, please feel free to comment or reply to re-open if you have any additional questions.

    Have a great day!

  4. Ryan Griffith closed this discussion on 07 Jul, 2016 08:05 PM.

Discussions are closed to public comments.
If you need help with Cascade CMS please start a new discussion.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac


26 Aug, 2016 01:19 PM
25 Aug, 2016 03:02 PM
25 Aug, 2016 12:50 PM
24 Aug, 2016 08:43 PM
24 Aug, 2016 07:20 PM
21 Aug, 2016 01:20 PM