// you’re reading...

CMS

How to remove the embedded OpenText comment/header from html content


Something that has always bugged me with our favourite CMS / WebSite Management Server is that when publishing HTML content a comment/header/advert is embedded next to the html head tag in all web pages that includes the page id, CMS product name and version number. This comment/header is a good source of information to start profiling your organisation for security flaws and ways to get in and cause some havoc! Okay I’m being a little melodramatic as a lot of the time RedDot CMS OTWSMS is sitting behind a corporate firewall and a little security through obscurity isn’t going to make a huge difference if someone is looking to cause you ill intent. Come to think of it you’re more likely to be contacted by an OpenText partner providing good reasons to upgrade from your old version of the CMS!

Whether it’s security, keeping the account executives away or simply looking to produce cleaner code, with the many configuration options within RedDot CMS OTWSMS you’d assume there would be an option to disable the header/comment, right? Well there isn’t one! Though there is a way to trick reddot Open Text Web Solutions Management Server in to not inserting it. An example of the comment/header in question is as follows:

<html>
<head><!-- PageID 2 - published by RedDot 7.5 - 7.5.1.86 - 13708 -->
</head>
……

or
<html>
<head><!-- PageID 1 - published by Open Text Web Solutions 9 - 9.0.1.56 - 17320 -->
</head>
……

I always found it strange that non-html content never had the header inserted. So with a little investigation I came to the conclusion that the <head> tag was the culprit. If you remove the <head> tag the OT comment/header is never inserted but of course you can’t create a valid html page without an opening header. The solution is to make RedDot CMS OTWSMS think that it isn’t producing a valid tag but really is. It might sound a little confusing but hopefully the following workaround code makes sense….

<html>
<he<!IoRangeNoRedDotMode><!/IoRangeNoRedDotMode<ad>
</head>
….

As per the code above we’re hijacking the not in smartedit/smartedit only functionality and the rendering order of the CMS to make it believe there is no head tag.

Keep in mind the above workaround is as unofficial as this blog. Please check with OpenText before making these changes in case your support gets cancelled, the sky falls in or other major issues occur.

EDIT: thanks to a tip off from Jian’s post below i’ve updated the comment/header workaround to no longer use pre-executing script to achieve the same result … which will drop the comment but speed up publication times. Thanks Jian!

EDIT2: Ashley pointed out in the comments below, that this also prevents RedDot from publishing the inline style sheets that is created for the text editor (these styles are already applied via the main site’s css file).

Share and Enjoy:
  • Print
  • email
  • Twitter
  • Digg
  • Reddit
  • StumbleUpon
  • Google Bookmarks
  • del.icio.us
  • MisterWong
  • Facebook
  • LinkedIn

No related posts.

About the author:

Morgan Ritchings is the Web Solutions lead for StoneBridge Systems and as part of his role has a keen focus on the Open Text Web Solutions suite (formerly RedDot CMS/LS). Keep an eye out for him at domestic airports around Australia as he flies across the continent offering his skills and services. You can find his profile on linkedIn here

Discussion

6 comments for “How to remove the embedded OpenText comment/header from html content”

  1. Hi all,

    Well, preexecution resends the page back to IIS for rendering, adding another precious second, at least. According google’s search result metrics, a search returns in 2 seconds = FAST, 3 seconds = SLOW. Hence, no preexecution if it can be avoided.

    The “Not SmartEdit Mode blockmark” works too.
    <he<!IoRangeNoRedDotMode><!/IoRangeNoRedDotMode>ad>

    To give credit where it is due, Morgan’s post inspired this solution.

    Best,

    -Jian

    Posted by Jian Huang | December 7, 2010, 5:52 pm
  2. Morgan, you are a legend.

    Posted by Rob Weekhout | December 8, 2010, 1:13 am
  3. So do you use the info placeholder for page id then for when pages go wrong? ;-)

    Posted by Barry | December 8, 2010, 6:14 am
  4. I wanted to share a handy trick we found based on this solution. We wanted to find a way to prevent RedDot from publishing the inline style sheets that we create for the text editor (these styles are already applied via the main site’s css file).

    You can prevent RedDot from automatically adding the “inline styles” on the published page by inserting this hack in the tag.

    Posted by Ashley | January 17, 2011, 6:04 pm
  5. Thanks Ashley!

    Posted by Markus Giesen | January 18, 2011, 1:24 am
  6. Pity this trick only works for ‘Assign fixed style sheet’ and not ‘Assign Style Sheets’, which still get the additional CSS code published now and again (only resolved by clearing the page cache but returns frequently) – I got this confirmed as a bug in February but no fix yet :-(

    Posted by Neil Fegen | July 6, 2011, 4:29 pm

Post a comment



Stay up to date! - Get notified about followup comments

If you don't feel the urge to comment but wish to stay in the loop:
Just enter your email and subscribe to new comments.

Subscribe without commenting

Recent Tweets

  • RT @AirKraft: Transport Canada breakout: they manage 80K pages and 300K assets with WSM(RedDot). Wow! #OTCW 2010-11-11
  • The RedDot usergroup session 'Future of WCM' is in National Harbor 7, now. See you there! #otcw 2010-11-11
  • RT @yttergren: @AirKraft: Calling all WSM(RedDot) devs: share your solutions on http://bit.ly/bgPIof EVERY solution can win an iPad #OTCW 2010-11-10
  • Come to the Solution Exchange session. Enhance your (#reddot) CMS project! Chesapeake 12, 3:20pm #otcw Looking forward to see you there! 2010-11-10
  • More updates...