Client-side slash validation and DOM abstraction