nbspRemover [Official Support]

I was going to post the same, I have the same problem too.

The addon helped me remove nbsp from over 200 notes, but some of them still exist, especially with newly added notes. Just wanted to remind you that the addon works almost perfectly :frowning:

Does anyone know why this crap occurs? (I tried to clean up the text strings as much as possible using Excel before importing them into Anki)

Hey kleiner Pirat,

love the Addon. Any chance to add my own replacement rules in the script. I already found the script:

def clean_collection() -> None:
    op = find_and_replace(
                parent=mw,
                note_ids=[],
                search=" ",
                replacement=" ",
                regex=False,
                field_name=None,
                match_case=True,
            )
    op.success(
                lambda out: purge_tooltip(mw, out.count)
            )
    op.run_in_background()

Where and how may I insert multiple find_and_replace rules

Thanks :slight_smile:

Hendrik

Try the built-in find and replace menu to get rid of them. I’m assuming the  s on your screenshot are escaped in some weird way, so you need to press Ctrl+Shift+X first to see how they’re represented.

Any chance to take a look at this problem? nbsp spaces are the bane of my existence

Hi!
The nbsp;-problem is really annoying, so I looked for a solution and found your plugin. I just installed the nbsp remover plugin. Then I restarted Anki.

But the plugin does not seem to work: It’s supposed to remove nbsp while editing, but when pasting text from Wikipedia onto a new note, I still get a plentitude of nbsp;s. They are not removed, even when I write something in the textbox myself.
I’m using Anki version ⁚23.12.1 (1a1d4d54)⁩ (Python 3.9.15 Qt 6.6.1 PyQt 6.6.1)
(and MS Windows)

The add-on is not enabled in your screen, did you forgot to restart?

This green button appears once the add-on is enabled
image

I’m using Anki on Windows 10 and I don’t recognize your interface. As you can see on this image, the menu entry is added.
I find no changes on the add new card window (it’s the “LĂ€gg till” window in my Swedish interface).

What add-ons do you use besides nbsp remover?

Perhaps it works anyway!
I thought the nbsp;s would be removed when pasting or writing. It was not until now that I notised a smiley appearing when I saved a new note, telling me that 1 nbsp was removed!

Hi @kleinerpirat!

I love your addon! Thanks so much for making it!

Since Friday however it just stopped working, I edited the collection.py file today to below and now it’s working again.

def clean_collection() -> None:
    op = find_and_replace(
                parent=mw,
                note_ids=[],
                search=r"\u00A0",
                replacement=" ",
                regex=True,
                field_name=None,
                match_case=True,
            )
    op.success(
                lambda out: purge_tooltip(mw, out.count)
            )
    op.run_in_background()

Do you know why this happened? Also did I do it correctly or am I going to run into issues with doing it this way?

Anki version ⁚24.06.2 (33a92379)⁩
Python 3.9.18 Qt 5.15.2 PyQt 5.15.5

The addon does not work. It detects the   on adding notes, the little alert guy declares the correct number of   in the note, but doesn’t delete them. It doesn’t detect or delete any using the collection purge tool. Initially had a conflict with another addon, but disabling it didn’t do anything.

Like Big_Kev reported last June, this doesn’t work. I disabled all other add-ons and it still does not actually remove the non-breaking spaces. It pops up the little dude with the correct number but doesn’t do the work.

Anki 25.02.5 (29192d15) (ao)
Python 3.9.18 Qt 6.6.2 PyQt 6.6.1
Platform: macOS-15.5-arm64-arm-64bit

Hi I fixed this add-on and uploaded it to AnkiWeb. addonPage::broom:nbsp Remover - Auto remove HTML spaces in bulk (Fixed by Shigeඞ) addonCode: 1998029342

Your fork of the addon still conflicts with my addon as the original did. I dont know if its my fault because im doing something wrong or the nbsp remover doing something that shouldnt

:frowning:

Thanks for the report, I fixed it and uploaded it. It should work after updating the add-on. (Tools → Add-ons → Check for update)

It works! Thanks!