Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi, I have an issue where when cycling though child nodes:
@foreach (var block in CurrentPage.Children) { <h2>@block.title</h2> @Html.Raw(block.GetPropertyValue("content")) }
(the content is just HTML) any links in the HTML have strange href values like:
<a href=<a href="url">link</a>>link</a>
Obviously this doesn't go anywhere useful. Any help would be much appreciated.
Hi David
Can you show how its storing in Umbraco?
I mean "content" property.
Thanks,
Alex
<section id="1107" key="e34324ff-5e8b-426b-ab4e-9901eab1f909" parentID="1071" level="4" creatorID="0" sortOrder="0" createDate="2017-05-10T09:19:01" updateDate="2017-05-10T14:13:51" nodeName="Know How" urlName="know-how" path="-1,1053,1057,1071,1107" isDoc="" nodeType="1099" creatorName="David Daly" writerName="David Daly" writerID="0" template="0" nodeTypeAlias="section"><content><![CDATA[<p>5 Things to Know - Capital Allowances, Indemnities, Japanese Knotweed, Promap, SearchFlow Tue 25 Apr 2017 - <a href="http://newforstersintranet/CommercialRealEstate/CommercialRealEstateKnowHowDetail.aspx%3FHowID=2368">Read more</a> Talk on MEES and EPCs (19.04.17) Thu 20 Apr 2017 - <a href="http://newforstersintranet/CommercialRealEstate/CommercialRealEstateKnowHowDetail.aspx%3FHowID=2367">Read more</a> Know How Meeting (20.04.2017)<br /> Thu 20 Apr 2017 - <a href="http://newforstersintranet/CommercialRealEstate/CommercialRealEstateKnowHowDetail.aspx%3FHowID=2366">Read more</a> Solicitors Journal April 2017 Quarterly Update<br /> Tue 18 Apr 2017 - <a href="http://newforstersintranet/CommercialRealEstate/CommercialRealEstateKnowHowDetail.aspx%3FHowID=2365">Read more</a> >5 Things to Know - Highways Searches, Buyer's Liens, Lease Cancellations, Indemnity Insurance<br /> Tue 11 Apr 2017 - <a href="http://newforstersintranet/CommercialRealEstate/CommercialRealEstateKnowHowDetail.aspx%3FHowID=2364">Read more</a></p>]]></content><title><![CDATA[Know How]]></title></section>
It looks like right HTML data.
Are you sure that this data is in the page?
Can it be replaced or handled in some other place, just after rendering?
The data definitely appears in the page and renders as Html but the href in the links renders as the entire <a> tag.
<a>
How would I check whether its's handled elsewhere?
Oh thanks for looking by the way, much appreciated.
you are welcome, can you check please source code of the page on the site?
Is it good HTML?
How do you inspecting links now?
Sorry for the late reply I've had no internet access.
I'm inspecting the Html with chrome developer tools and everything is fine except for the links.
Oddly, when I view the source the link appears correctly but if I use Inspect Element it has the previously mentioned issue.
Which leads me to think its a javascript issue maybe?
Hi David,
Yes, your links are ok after rendering on the server, something wrong with html or js in the browser.
Try to investigate what scripts are working with this part of page.
Hope it will help,
Hi Alex, sorry for the time waste, it was indeed some rogue Javascript on the masterpage (written by someone less than qualified).
Thanks for your time.
You are welcome, David. Have a great weekend.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Broken links on Child nodes
Hi, I have an issue where when cycling though child nodes:
(the content is just HTML) any links in the HTML have strange href values like:
Obviously this doesn't go anywhere useful. Any help would be much appreciated.
Hi David
Can you show how its storing in Umbraco?
I mean "content" property.
Thanks,
Alex
It looks like right HTML data.
Are you sure that this data is in the page?
Can it be replaced or handled in some other place, just after rendering?
Thanks,
Alex
The data definitely appears in the page and renders as Html but the href in the links renders as the entire
<a>
tag.How would I check whether its's handled elsewhere?
Oh thanks for looking by the way, much appreciated.
you are welcome, can you check please source code of the page on the site?
Is it good HTML?
How do you inspecting links now?
Sorry for the late reply I've had no internet access.
I'm inspecting the Html with chrome developer tools and everything is fine except for the links.
Oddly, when I view the source the link appears correctly but if I use Inspect Element it has the previously mentioned issue.
Which leads me to think its a javascript issue maybe?
Hi David,
Yes, your links are ok after rendering on the server, something wrong with html or js in the browser.
Try to investigate what scripts are working with this part of page.
Hope it will help,
Alex
Hi Alex, sorry for the time waste, it was indeed some rogue Javascript on the masterpage (written by someone less than qualified).
Thanks for your time.
You are welcome, David. Have a great weekend.
Alex
is working on a reply...