mirror of
https://github.com/xroche/httrack.git
synced 2026-08-13 11:12:19 +03:00
* WebHTTrack settings pages interpolate values into double-quoted attributes unescaped #988 escaped the templates' element bodies and event handlers but left attribute values alone, because cat_html_escaped() keeps the double quote raw on purpose: the tooltips are written title='${html:LANG_x}'. The settings pages put about seventy values inside double-quoted attributes, where a " opens a new attribute. Add a fourth interpolation mode, attr:, escaping < > & ' " as entities and nothing else, and point the 230 double-quoted attribute positions at it. file.html's file:// href stays on the html-urlescaped mode, which now emits %22 for the quote the way unquoted: already did, and step2.html's in-script literal moves to js:. Test 185 now requires attr: in a double-quoted attribute and js: inside a script block; 217 drives hostile values through three templates and a translation. Closes #989 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Close the two attribute sites the template sweep could not reach The liststr: format builds its own <option value="..."> in C, so no template edit covers it, and it escaped with the helper that leaves the double quote raw. Its values are the project directory names and the Category= line of each project's winprofile.ini, both of which can hold a quote. The save side kept hex-decoding a backslash plus two hex digits, so a path typed as C:\ab displayed correctly but was written to ~/.httrack.ini as C: plus byte 0xAB. The ini writer has no inverse for that escape; the one caller that needs it is a template literal (${test:proxytype:\3A//}), so the decode now applies only there. Test 185 classified attributes with a regex that missed a spaced =, an unquoted or single-quoted value, a template outside html/server/*.html, and an output-mode region the file never closes; the counting floors it asserted also survived a count-preserving rewrite. It now walks tags, asserts the property on every site it classifies, and proves it can see each of those forms on a synthetic template first. Test 217 gains a Latin-1 byte in a translation, the POST-render-POST round trip, and the two fixes above. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> * Trim the comments the last commit added Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Xavier Roche <roche@httrack.com> --------- Signed-off-by: Xavier Roche <roche@httrack.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
171 lines
5.0 KiB
HTML
171 lines
5.0 KiB
HTML
<html xmlns="http://www.w3.org/1999/xhtml" lang="${attr:LANGUAGE_ISO}">
|
|
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=${attr:LANGUAGE_CHARSET}" />
|
|
<meta name="description" content="${attr:LANG_METADESC}" />
|
|
<meta name="keywords" content="${attr:LANG_METAKEYW}" />
|
|
<title>'${html:projname}' - HTTrack Website Copier</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" media="screen" href="style.css">
|
|
<script type="text/javascript" src="ping.js" defer></script>
|
|
|
|
<script language="javascript">
|
|
<!--
|
|
|
|
// initialize wparent to false if necessary (Konqueror bug workaround)
|
|
if ((typeof wparent) == "undefined") {
|
|
wparent=false;
|
|
}
|
|
|
|
function do_load() {
|
|
window.status=' ';
|
|
}
|
|
function do_unload() {
|
|
}
|
|
function do_add() {
|
|
if (wparent)
|
|
pparent = wparent;
|
|
else if (parent && parent.document)
|
|
pparent = parent.document;
|
|
if (pparent
|
|
&& pparent.form
|
|
&& pparent.form.urls
|
|
&& document.form.urladr.value.length > 0
|
|
) {
|
|
str = "";
|
|
if (pparent.form.urls.value.length > 0) {
|
|
pparent.form.urls.value += "\r\n";
|
|
}
|
|
str="http://";
|
|
if (document.form.urllogin.value.length > 0) {
|
|
str += document.form.urllogin.value;
|
|
str += ":";
|
|
str += document.form.urlpass.value;
|
|
str += "@";
|
|
}
|
|
str += document.form.urladr.value;
|
|
pparent.form.urls.value += str;
|
|
return 1;
|
|
} else {
|
|
alert('Javascript error, or parent window lost');
|
|
}
|
|
return 0;
|
|
}
|
|
function info(str) {
|
|
window.status = str;
|
|
}
|
|
// -->
|
|
</script>
|
|
|
|
</head>
|
|
<body onLoad="do_load();" onUnload="do_unload();">
|
|
|
|
<table width="76%" border="0" align="center" cellspacing="0" cellpadding="0" class="tableWidth">
|
|
<tr>
|
|
<td><img src="images/wordmark.svg" width="400" height="36" alt="HTTrack Website Copier" title="" border="0" id="title" /></td>
|
|
</tr>
|
|
</table>
|
|
<table width="76%" border="0" align="center" cellspacing="0" cellpadding="3" class="tableWidth">
|
|
<tr>
|
|
<td width="90%" id="subTitle">${LANG_OSFWB}</td>
|
|
<td id="subTitle" align="right">
|
|
<a href="/server/file.html" target="_blank"
|
|
onClick="window.open('/server/file.html', 'help', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480'); return false"
|
|
title='${html:LANG_O1}' onMouseOver="info('${js:LANG_O1}'); return true" onMouseOut="info(' '); return true"
|
|
style="color:#FFFFFF"
|
|
>
|
|
${LANG_O1}
|
|
</a>
|
|
</td>
|
|
${/* show help only if available */}
|
|
${do:if-file-exists:html/index.html}
|
|
<td id="subTitle">|</td>
|
|
<td id="subTitle" align="right">
|
|
<a href="/index.html" target="_blank"
|
|
onClick="window.open('/server/help.html', 'help', 'toolbar=no, location=no, directories=no, status=yes, menubar=no, scrollbars=yes, resizable=yes, width=640, height=480'); return false"
|
|
title='${html:LANG_TIPHELP}' onMouseOver="info('${js:LANG_TIPHELP}'); return true" onMouseOut="info(' '); return true"
|
|
style="color:#FFFFFF"
|
|
>
|
|
${LANG_O5}
|
|
</a>
|
|
</td>
|
|
${do:end-if}
|
|
</tr>
|
|
</table>
|
|
<table width="76%" border="0" align="center" cellspacing="0" cellpadding="0" class="tableWidth">
|
|
<tr class="blak">
|
|
<td>
|
|
<table width="100%" border="0" align="center" cellspacing="1" cellpadding="0">
|
|
<tr>
|
|
<td colspan="6">
|
|
<table width="100%" border="0" align="center" cellspacing="0" cellpadding="10">
|
|
<tr>
|
|
<td id="pageContent">
|
|
<!-- ==================== End prologue ==================== -->
|
|
|
|
<table border="0" width="100%">
|
|
<tr><td width="90%">
|
|
<h2 align="center"><em>${LANG_G43}</em></h2>
|
|
</td><td>
|
|
<a href="/index.html" target="_blank">${LANG_TIPHELP}</a>
|
|
</td></tr></table>
|
|
|
|
<br>
|
|
|
|
|
|
<form action="${attr:thisfile}" name="form">
|
|
<table width="100%">
|
|
<tr><td>${LANG_T2}</td><td>http://<input name="urladr"
|
|
title='${html:LANG_T10}' onMouseOver="info('${js:LANG_T10}'); return true" onMouseOut="info(' '); return true"
|
|
></td></tr>
|
|
<tr><td colspan=2>
|
|
|
|
<table width="100%">
|
|
<th>${LANG_T4}</th>
|
|
<tr><td>${LANG_T5}:</td><td><input name="urllogin"
|
|
title='${html:LANG_T12}' onMouseOver="info('${js:LANG_T12}'); return true" onMouseOut="info(' '); return true"
|
|
></td></tr>
|
|
<tr><td>${LANG_T6}:</td><td><input name="urlpass"
|
|
title='${html:LANG_T13}' onMouseOver="info('${js:LANG_T13}'); return true" onMouseOut="info(' '); return true"
|
|
></td></tr>
|
|
<tr><td>${LANG_T7}:</td><td><input type="button" value="${attr:LANG_T8}" onClick="alert('not yet implemented!')"
|
|
title='${html:LANG_T14}' onMouseOver="info('${js:LANG_T14}'); return true" onMouseOut="info(' '); return true"
|
|
></td></tr>
|
|
</table>
|
|
|
|
</td></tr>
|
|
|
|
<tr><td>
|
|
<input type="button" value="OK" onClick="if (do_add()) { window.close(); }"
|
|
title='${html:LANG_TIPOK}' onMouseOver="info('${js:LANG_TIPOK}'); return true" onMouseOut="info(' '); return true"
|
|
>
|
|
</td></tr>
|
|
|
|
</table>
|
|
</form>
|
|
|
|
<!-- ==================== Start epilogue ==================== -->
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table width="76%" border="0" align="center" valign="bottom" cellspacing="0" cellpadding="0">
|
|
<tr>
|
|
<td id="footer"><small><small>© 1998-2026 Xavier Roche & other contributors - Web Design: Leto Kauler.</small></small></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|