Ampersand breaks title formatting


Author
Message
Bob Smith
Bob Smith
Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)
Group: Forum Members
Posts: 69, Visits: 1

Turns out that the solution was to use the "REPLACE()" function:

=REPLACE(Fields!Title, "&", "&amp;") + "<br />Cost Projection<br/><u>Click to return to full company listing</u>"

This replaces the ampersand character with an escaped ampersand character code thereby eliminating the issue.

Thanks Nevron support!



Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Bob,
The problem is because the & operator doesn’t support chaining.
You should use something like:
=JOIN(Fields!Title, "<br/>") + "<br />Cost Projection<br/><u>Click to return to full company listing</u>"
or
=JOIN(Fields!Title + "<br />Cost Projection<br/><u>Click to return to full company listing</u>", "<br/>")

Hopefully this helps.

 



Best Regards,
Nevron Support Team


Bob Smith
Bob Smith
Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)
Group: Forum Members
Posts: 69, Visits: 1

=Fields!Title & " Cost Projection <br/><u>Click to return to full company listing</u>"

Title fields:

1: Walmart

2: Ben & Jerry's

Title containing field 1 will work just fine - the formatted text will show:

"Walmart Cost Projection

Click to return to full company listing"

Title containing field 2 will be broken:

Ben & Jerry's Cost Projection <br/><u>Click to return to full company listing</u>

I believe this is due to the ampersand in ( & ) in the title field; it is appending the rest of the title as a string.


Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

Hi Bob,
You probably mean that you lose the XML formatting. Can you please provide a more detailed example with the XML formatting?



Best Regards,
Nevron Support Team


Bob Smith
Bob Smith
Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)Forum Guru (69 reputation)
Group: Forum Members
Posts: 69, Visits: 1

Hey!

Not super high priority, but I discovered that when a block of text is dynamically added to a title (ex: =FIRST(Fields!Title) & "Chart") and it happens to contain an ampersand (& the title field loses all it's HTML formatting. All the raw tags are visible.

Any way to escape the ampersand or scrub for it?


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search