
Fixing HTML Widows - dbough
http://thatsmyfrontend.com/fixing-html-widows/
======
kijin
> best non-back-end solution ... It's probably best to fix these before they
> even get to the browser.

Sure. But if you want to do this before "they even get to the browser", it's
_not_ going to be a "non-back-end solution". Anything that happens before your
content gets to the browser is back-end by definition.

If you control the blogging software and/or the template, it would be trivial
to replace the last space with &nbsp; when rendering the page. Good ol' string
manipulation, maybe a regexp or two. No need for JavaScript. I wouldn't be
surprised if somebody already wrote a WordPress plugin to do this.

~~~
dbough
> Anything that happens before your content gets to the browser is back-end by
> definition.

Huh? I didn't think that was in question.

> If you control the blogging software and/or the template, it would be
> trivial to replace the last space with &nbsp; when rendering the page.

No disagreements here.

> I wouldn't be surprised if somebody already wrote a WordPress plugin to do
> this

I'm sure there is too[1].

[1] [http://wordpress.org/plugins/wp-
typography/](http://wordpress.org/plugins/wp-typography/)

