# fontawesome5 doesn't work in the \cvsection of altacv.cls

I am using the AltaCV class.

When using fontawesome5 package in the \cvsection command as:

\cvsection{\faHandsHelping \ Volunteer}

I get the below error:

For immediate help type H . ...

l.11 \cvsection{\faHandsHelping \ Volunteer}

When using outside \cvsection fontawesome5 works fine but not in it. Can anyone help me with what's wrong with the \cvsection command. Here is the code

\newcommand{\cvsection}[2][]{%
\bigskip%
\ifstrequal{#1}{}{}{\marginpar{\vspace*{\dimexpr1pt-\baselineskip}\raggedright\input{#1}}}%
}


Use \protect:

\cvsection{\protect\faHandsHelping \ Volunteer}


The problem is in fontawesome5 that uses \cs_new:Nn where it should use \cs_new_protected:Nn.

The \MakeUppercase in the code was forcing the command \faHandsHelping to be in Uppercase as well. So I solved the issue by removing \MakeUppercase. Hence, the code becomes:

\newcommand{\cvsection}[2][]{%
\bigskip%
\ifstrequal{#1}{}{}{\marginpar{\vspace*{\dimexpr1pt-\baselineskip}\raggedright\input{#1}}}%