This problem only shows up when compiling to HTML.
I have some long URL's and a URL with underscore do not break inside table when compiled to HTML as it does when compiled to PDF.
I tried all the tricks I could find, and htlatex still does not want to break the URL inside the table. MWE
\documentclass[12pt]{article}%
\usepackage{longtable}
\usepackage{hyperref}
\makeatletter %from http://tex.stackexchange.com/questions/3033/forcing-linebreaks-in-url
\g@addto@macro{\UrlBreaks}{\UrlOrds}
\makeatother
%\usepackage[hyphenbreaks]{breakurl}
%\usepackage[hyphens]{url}
\begin{document}
\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
1&
\url{http://www.foo.com/questions/aaaaaa/aaaaaaa-aa-aaa-aaaaaaaaa-aaaaaaaaaa-aaaaa-aa-aaaaaaa-aaaaaa}
&
more&1/5/2016
\\\hline
\end{longtable}
Another table
\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
2&
\url{https://www.foo.com/post/aaa_aaa_aaaa_aaaaaaaa_aaaaa_aa_aaaaaaaaa_aaaaaa_aaa_aaa_aaaaaaaaa_aa_aaaaaaa_aaa_aaaaaaaa_aaaaaaa}
&another good question&1/5/2016\\\hline
\end{longtable}
another one
\begin {longtable}{|p{.2in}|p{2.2in}|p{1in}|p{.8in}|}\hline
1&
aaaaaa aaaaaaa aa aaa aaaaaaaaa aaaaaaaaaa aaaaa aa aaaaaaa
aaaaaa aaaaa aaaaaaaaaa aaaaaaaa aaaaa aaaaaa
aaaaaa aaaaaaa aa aaa aaaaaaaaa aaaaaaaaaa aaaaa aa aaaaaaa
&more&1/5/2016
\\\hline
\end{longtable}
\end{document}
When compiled to pdf using pdflatex, this is the output, as expected:

When compiled to HTML using
htlatex foo.tex "htm,p-width"
this is the output

The problem shows up only with url with underscore. With hyphens in URL, it seems to do it fine.
Is there a way to make tex4ht break URL with underscore also?
TL 2015

word-breakandword-wrap, they don't seem to do anything in Firefox, maybe it would work in Chrome – michal.h21 May 09 '16 at 21:17