Is there any filter or function existing for that? (see my comment at the end of the line)