Hopefully this is easy. I would like to underline the text of the section title in the table of contents (with the section number removed). Similar to this picture, with the red line where the underline should be:

Please note that I don't want to underline the section title in the document, as per this question, only its entry in the table of contents.
I have tried the following code, but it doesn't work, as \underline expects the text to be supplied as a parameter.
\documentclass[a4paper]{article}
\usepackage{lipsum}
\RequirePackage[titles]{tocloft}
\makeatletter
\renewcommand{\cftsecpresnum}{\begin{lrbox}{\@tempboxa}}
\renewcommand{\cftsecaftersnum}{\end{lrbox}}
\setlength{\cftsecnumwidth}{0pt}
\renewcommand{\cftsecfont}{\underline} % Doesn't work
\makeatother
\begin{document}
\tableofcontents
\section{Section 1 title}
\lipsum[1-2]
\section{Section 2 title}
\lipsum[3-4]
\end{document}



\section[\underline{Section 1 title}]{Section 1 title}. Depending how often you are doing this (hopefully not often), you may want to automate the approach with a new command like\ulsection... – jon Apr 04 '14 at 14:12