7

I was trying to modify some styling in standard pagelayout. I know way back there was an hack where devs used to create static resource with JS in it and embed the JS in the section header of a standard pagelayout ( pretty much the same as hacking the sidebar). There is an accepted solution here too on this : https://stackoverflow.com/questions/13254137/unable-to-access-dom-elements-of-standard-page-from-jquery-in-inline-vf-page

Does this still work?

I tried this today and the section header name is taking the script tags too in it as below

enter image description here

  • Can you post your exact markup? Rather than a change in the page behavior, it could be a syntactic mistake. Also the contents of your static resource, and anything else relevant. – Thomas Crouse Jun 4 '13 at 19:43
10

Nope.

https://eu1.salesforce.com/help/doc/en/salesforce_spring13_release_notes.pdf, page 88

HTML Markup Escaped in Page Layout Custom Section Names

Critical Update for rendering custom section names on page layouts is available in affected organizations. This update changes how custom section names in page layouts are rendered, to escape HTML tags and other markup. Prior to the Spring’13 release, custom section names in page layouts weren’t escaped, allowing the use of HTML markup and other tags. This wasn’t an intended feature, and the Escape Page Layout Section Names update corrects this behavior. With this update, tags in section names are escaped, and aren’t interpreted as markup in the browser. For example, the left angle bracket character, “<” is rendered as &lt; and displays as a visible “<” in the browser.

This Critical Update only appears in existing organizations that have markup in section names, whether for styling such as font size or color, or to execute JavaScript. These section names need to be fixed. To fix them, edit the section name in the Section Properties panel, and remove all HTML and other markup.

When you have modified any affected custom section names, you should activate this Critical Update.

| improve this answer | |
  • 1
    The Google-fu is strong with this one. – Daniel Hoechst Jun 4 '13 at 19:59
  • @DanielHoechst I knew it's Spring-related, took me a while because I kept searching for "section header" (same as in the question). Still - you were first :) Luckily I don't rely on this "feature" anymore but I can imagine it caused bit of panic and extra work at my old job. Eh. I think same trick can be still embedded into sidebar? Probably with small delay / onload / ondcocumentready if it'd refer to the DOM that doesn't exist yet... – eyescream Jun 4 '13 at 20:05
2

I'm nearly certain there was a recent critical update that came out that prevented html markup in labels. Unfortunately, my Google-fu has failed me and I can't find a link for corroboration.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.