diff --git a/src/calibre/ebooks/rb/rbml.py b/src/calibre/ebooks/rb/rbml.py
index 3b88f3bc09..f18803e8d0 100644
--- a/src/calibre/ebooks/rb/rbml.py
+++ b/src/calibre/ebooks/rb/rbml.py
@@ -122,7 +122,7 @@ class RBMLizer(object):
href = href.partition('#')[2]
href = os.path.splitext(os.path.basename(href))[0]
tag_count += 1
- text += '' % href
+ text += '' % href
tag_stack.append('A')
# Anchor ids