ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Is there a way to remove empty character spaces from a text field?

June 08, 2011 2:51am

Subscribe [2]
  • #1 / Jun 08, 2011 2:51am

    JulesWebb

    271 posts

    Hi

    I’m having problems with white spaces that are accidentally being included after a members username. Below is an example of an extra space being saved. I know this isn’t a huge violation, but I figured if there were a way to automatically remove any white spaces that it would be a good thing to implement.

    <section id="hcard-pdobrowolski " class="vcard">

    ExpressionEngine v2.1.3 - Build:  20101220

    Thanks for any suggestions

    jules

  • #2 / Jun 08, 2011 2:56pm

    Sue Crocker

    26054 posts

    Hi, Jules.

    http://devot-ee.com/add-ons/phpstringfun/ will let you use rtrim to trim off spaces at the end of strings.

    But I agree, the username shouldn’t have white spaces after it.

    Let me test that in an early version of 2.2 and see if I can replicate. If it is a problem, it’s an easy fix.

  • #3 / Jun 08, 2011 3:16pm

    Sue Crocker

    26054 posts

    Reported as a bug

    https://support.ellislab.com/bugs/detail/15909/

    But the larger issue is if a trailing space is something they want.

  • #4 / Jun 08, 2011 11:25pm

    JulesWebb

    271 posts

    Hi Sue

    Thanks for submitting the bug report, I’m following it.

    I also installed phpstringfun, worked perfectly—-thanks for the suggestion!

    Take care,
    Jules

  • #5 / Jun 09, 2011 10:37am

    Sue Crocker

    26054 posts

    Glad that works for you.. If anything else comes up, please do let us know in a new thread..

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases