How to remove the Zero Space Character that Repeaters/ListVi

Posted by Community Admin on 04-Aug-2018 15:56

How to remove the Zero Space Character that Repeaters/ListViews generate?

All Replies

Posted by Community Admin on 04-Jun-2012 00:00

See this Stack Overflow thread: http://stackoverflow.com/questions/10882970/how-to-remove-the-zero-space-character-8203-that-asp-repeaters-generate 

I have a basic repeater that generates an unordered list. Though my markup does not contain the zero space character(

​
), it is generated preceding each LI in the item template. This little character messes up my design as it adds space between the list items. I have changed this repeater to a RadListView and a list view and have experienced the same result.

I created a new project to tried to reproduce this issue outside of Sitefinity and could not. Hence why I think Sitefinity is doing it. I am on Sitefinity 5.

I am about to do a client side hack and just remove the characters with jQuery. The little programmer inside of me would die if I did that though and I would like him not to die. Please help me keep a clear conscience and show me the proper way to remove this character or at least explain to me why some entity has decided to bestow this magical character upon my item template.

Posted by Community Admin on 05-Jun-2012 00:00

Erik,

In all seriousness, have you tried completely deleting the block of code and then retyping it? :)

It seems like a silly solution but I can't count the number of times I've had nonsense appear at the top of PHP files that I've written (which, then, spurt errors all over the place)...nor do I care to admit how much time passes before I'd found a couple of them. lol

Posted by Community Admin on 06-Jun-2012 00:00

I have deleted most of it. I opened the file in notepad++ with all characters visible and nothign is there that shouldn't be. This isn't isolated to one file though. It occurs in all the repeaters, list views, and rad list views that I have looked at.

Posted by Community Admin on 22-Feb-2013 00:00

Here was my hack to get around this:

if ($('.my-list').length > 0)
    $('.my-list').each(function()
        $(this).html($(this).children('li'));
    );

This thread is closed