Performance Point Report Web Part & Unterminated String Constant

Recently I had this weird javascript error when I added performance point report web parts to a page that uses a custom master page. The error on the page was ‘Unterminated string constant’ and I could not see any of the report web parts. After a bit of google I found this post by Martin Hatch which described exactly the same issue. Apparently the issue was because separate lines in the element.

What I had was

<title id="onetidTitle">
<asp:ContentPlaceHolder ID="PlaceHolderPageTitle" runat="server" />

And the fix :

<title id="onetidTitle"><asp:ContentPlaceHolder ID="PlaceHolderPageTitle" runat="server" /></title>