I have a custom object with a Long Text Area field to store a string that may be longer than 255 characters.
The contents of this string often includes text that looks like a hyperlink, but is not intended to be used as such.
E.g. somewhere in the value will appear a domain.com string:
Bacon ipsum dolor sit amet ground round exercitation google.com do laboris ham hock. Elit dolore aute consectetur, labore tenderloin anim eiusmod drumstick in.
Which Salesforce will render as:
How can I prevent Salesforce from automatically creating hyperlinks for these?
It seems to happen anywhere the field is used on a page layout or directly bound to in Visualforce.
I did find in Visualforce I could wrap the field in the controller and bind to a string version rather than directly to the field. This prevented the hyperlinks from being created.
E.g.
public class BaconWrapper {
public Bacon__c bacon {get;set;}
// Bind to this.
public string BaconIpsum {
get {
return bacon.BaconIpsum__c;
}
}
public BaconWrapper(Bacon__c cBacon) {
this.bacon = cBacon;
}
}
<apex:column value="{!b.bacon.BaconIpsum__c}" id="theValue">
. I guess I can deal with this field on a use-by-use basis to prevent the automatic hyperlinks. It doesn't directly address the standard page layouts.text-decoration: none;
property?