It seems like a lost case using Matlab code in Latex when it comes to tex4ht.
I switched to using matlab-prettifier package instead of mcode package to load Matlab code in Latex since I found too many problem with tex4ht using mcode. I already posted 2 questions on that. mcode-package-with-tex4ht-and-lualatex-produce-invalid-html-for-strings-in-matla and tex4ht-scrambles-some-matlab-code-when-using-mcode-package
Now I found another problem with using matlab-prettifier package. The problem is that string quotes are removed from Matlab code when using \lstinputlisting vs. when using lstlisting for same code.
I have tried changing the escapechar but nothing worked. Here is MWE
\documentclass[12pt]{article}%
\usepackage[T1]{fontenc}
\usepackage[utf8]{luainputenc}
\usepackage{amsmath,mathtools}
\usepackage[numbered,framed]{matlab-prettifier}
\lstset{
style = Matlab-editor,
basicstyle = \mlttfamily,
escapechar = `,
mlshowsectionrules = true,
}
\begin{document}
\lstinputlisting{foo_x.m}
\begin{lstlisting}[language=Matlab,style=Matlab-editor]
% ode45 "is based on an explicit Runge-Kutta formula...
% program"
%
function foo_x
clear; clf; clc;
x=10;
fprinf('this is %d\n',x);
end
\end{lstlisting}
\end{document}
Same code is in the file foo_x.m as shown above inside the latex file. Exactly same listing. To save you time making foo_x.m and copy the code to it to reproduce this, here is link to the m file
This is what make4ht produces in HTML:

Notice the difference from the first listing and the second listing for same code. The first one do not have single quote around the strings.
Compiled using
make4ht --lua -u foo.tex
Here is what lualatex produces. Same code in both cases.

I removed \usepackage[utf8]{luainputenc} from the MWE but it made no difference. I can keep trying adding and removing packages and changing options, but this is getting tiring really. It seems using Matlab code in Listing with make4ht --lua is a problem. When I remove the --lua option it works:
make4ht -u foo.tex

but I need to use --lua option with make4ht. So what is the solution?
TL 2015 on Linux.
