Detect and replace the   character

webadmin's Avatar

webadmin

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

    Hi,

    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.

    Thanks!

  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.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? 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