Skip to main content
Jared Hess
Legend
August 17, 2009
Answered

RH's HTML Editor Changing < to <

  • August 17, 2009
  • 2 replies
  • 1851 views

I typed this code to call a Javascript from one of two possible locations:

<script
src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"
</script>

<script
src="../feedback_script.js" language=javascript type="text/javascript"
style="x-condition: Online;"</script>

However on the first call, RH changes it to the following once I click out of HTML or navigate away from the topic:

<script
src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"
&lt;/script>

<script
src="../feedback_script.js" language=javascript type="text/javascript"
style="x-condition: Online;"</script>

Notice that the closing tag, </script>, has been replaced as &lt;/script>.

This breaks the calling statement. Anywone know why RH is doing this and how to make my code "stick"?

Thanks,

Jared Hess

RH 7.0.3.001

Win32 Vista

HTMl Help Output

This topic has been closed for replies.
Correct answer Amebr

Ahh, my bad... Didn't pay enough attention, it should be like this:

<script  src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"></script>

<script  src="../feedback_script.js" language=javascript type="text/javascript"  style="x-condition: Online;"></script>

I'n not sure about the style attribute though, but it probably won't do any harm.

Greet,

Willam


Oh, I missed it the first time too. I've coloured and bolded the missing part of the tag as per William's post. I tried it in RH6 and RH7 and the code isn't changed when the missing bracket is included.

<script  src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"></script>

<script  src="../feedback_script.js" language=javascript type="text/javascript"  style="x-condition: Online;"></script>

2 replies

Jared Hess
Legend
August 18, 2009

Thanks everyone for your help. I tried MergeThis's suggestion, but that didn't work either... at least the < kept changing.

After some more testing, seems that if I use the Insert | HTML | Advanced | Script menu item and use the dialog box to insert the script it keeps the < symbol intact. Wish I could just use the HTML Editor like an editor and just paste and type my HTML like I desired w/o RH messing with it. But oh well guess you can't have your cake and eat it too...

Willam van Weelden
Inspiring
August 18, 2009

Hi,

Embed all tags in < and >. RoboHelp replaces the second <, because it wants to close thet <script tag. You code should work if you use it as following:

<script>
src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"
</script>

<script>
src="../feedback_script.js" language=javascript type="text/javascript"
style="x-condition: Online;"

</script>

Greets,

Willam

Community Expert
August 18, 2009

I don't think that will work, as src, type, etc are attributes of the script tag, not the script code itself, and must be within the opening script tag.

However, I did find a page that says script doesn't support standard attributes, such as lang and style. So you might try removing those attributes and see if RH still plays with the brackets. Alos, possibly putting the type earlier might help (it shouldn't make a difference, but sometimes these things do).

http://www.w3schools.com/TAGS/tag_script.asp

Amebr

Willam van Weelden
Inspiring
August 18, 2009

Ahh, my bad... Didn't pay enough attention, it should be like this:

<script  src="feedback_script.js" language=javascript type="text/javascript" style="x-condition: Online;"></script>

<script  src="../feedback_script.js" language=javascript type="text/javascript"  style="x-condition: Online;"></script>

I'n not sure about the style attribute though, but it probably won't do any harm.

Greet,

Willam