Profile Picture

Ampersand breaks title formatting

Posted By Bob Smith 7 Years Ago
Author
Message
Bob Smith
Posted 7 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 7 Years Ago
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?



Nevron Support
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 2,892, Visits: 3,094

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
Posted 7 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 7 Years Ago
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
Posted 7 Years Ago
View Quick Profile
Supreme Being

Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)Supreme Being (3,958 reputation)

Group: Forum Members
Last Active: Last Month
Posts: 2,892, Visits: 3,094

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
Posted 7 Years Ago
View Quick Profile
Forum Guru

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
Last Active: 7 Years Ago
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!






Similar Topics


Reading This Topic