def avoid_wrapping(value):
 return value.replace(u' ', u'\xa0')

def avoid_wrapping ( value ) : return value . replace ( u' ' , u'\xa0' )
avoid text wrapping in the middle of a phrase by adding non-breaking spaces where there previously were normal spaces .