Using < and > in page titles does not work anymore

Please post all questions and comments regarding Help & Manual 7 here.

Moderators: Alexander Halser, Tim Green

Post Reply
Volker Beuter
Posts: 2
Joined: Tue Dec 05, 2023 5:48 pm

Using < and > in page titles does not work anymore

Unread post by Volker Beuter »

We write documentation for a larger software project with H&M.
The program creates different output files that are depending on some name the user provided. So for example an output file is
<project name>_output.dat, where the actual name is what the user selected for the project name. We used that notation with the names to be replaced in < and > and in H&M 5 it worked fine. Now we updated to H&M 7.5.4 and it does not work properly anymore. After compilation in the browsers the file notation is displayed correctly in the content treeview. But in the page headers all what is included does not show up, i.e. in the example above the file name is displayed as _output.dat. When I inspect the source I see that <project name> is interpreted in some code generated on the fly as a tag, with a closing </project>.
Changing the <TITLE> tag in the Topic Options of the topic into LF&lt;projectname&gt;.dat did not help.
What can I do to get the topic titles with such a notation get displayed correctly again?
User avatar
Alexander Halser
EC-Software Support
Posts: 4106
Joined: Mon Jun 24, 2002 7:24 pm
Location: Salzburg, Austria
Contact:

Re: Using < and > in page titles does not work anymore

Unread post by Alexander Halser »

Hi Volker,
<project name>_output.dat is not a valid variable reference. A correct reference would be <%projectname%>_output.dat without spaces and with <% and %>.

But even <%projectname%> is not a standard variable and must be user-defined. Here, it depends on the variable definition (HTML = raw, TEXT = might get escaped in HTML code) how the variable is being treated depending on where it's used. I'd need further context on which variable you are referring to and where this is used (in a topic as variable, in a template?) to give you a more detailed answer.
Alexander Halser
Senior Software Architect, EC Software GmbH
Volker Beuter
Posts: 2
Joined: Tue Dec 05, 2023 5:48 pm

Re: Using < and > in page titles does not work anymore

Unread post by Volker Beuter »

Thank you for the comment, but you got me wrong: My notation <project name>_output.dat was not intended as a H&M variable. (I know how to deal with them.) The string "<project name>_output.dat" has to appear in a browser displaying the compiled project to tell the user that <project name> will be replaced by his actual project name, not in the documentation, but in his simulation output files.

Meanwhile I solved it myself: You have to keep < and > in the topic treeview entries , but replace by &lt; and &gt; in the topic pages. When you compile the project this is displayed correctly as < and >. Nevertheless, it is annoying that you need to to this manually.
And there is still another issue: I write literals in New Courier font. So in this example _output.dat ought to be in New Courier font. I can change fonts even in Topic headers and it is displayed so in H&M, but in the browser there is no change of font in the topic headers. (With H&M 5 this worked fine.)
(In the topic treeview it was never possible to change fonts.)
User avatar
Tim Green
Site Admin
Posts: 23189
Joined: Mon Jun 24, 2002 9:11 am
Location: Bruehl, Germany
Contact:

Re: Using < and > in page titles does not work anymore

Unread post by Tim Green »

Hi Volker,
I write literals in New Courier font. So in this example _output.dat ought to be in New Courier font.
If I understand you correctly you are trying to insert this in the <Title> Tag: setting in Topic Options. If that is the case then that is a plain text field that cannot have any formatting attached to it. If you are putting it in another location, please describe where and how you are inserting it so that we can help you better.
Regards,
Tim (EC Software Documentation & User Support)

Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Post Reply