Getting escape character while populating data which is in html code

Mutthuluru Yashwanth Sai 0 Reputation points
2023-11-28T12:35:29.8733333+00:00

Hi Team,

As part of my process, I am generating a html code using a Stored Procedure via lookup activity. Im getting extra escape characters (") along with my code which breaks the color grading of my output. It would be great if you can help me to sort this issue.

Here im attaching the sample screenshot.

User's image

Thanks,

Yashwanth M

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,623 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Subashri Vasudevan 11,226 Reputation points
    2023-11-29T05:39:46.5066667+00:00

    Hi
    Mutthuluru Yashwanth Sai

    If the backslash is the problem, you can use string function replace to replace the escape character using below expression, which replaces backslash with an empty string. So, if you have a text like "color:green"\ then it will get replaced as "color:green"

    @replace(activity('Lookup1').output.firstRow['HtmlOutput'],'\\','')
    

    You can use this expression and assign the output to a variable and use that variable in your pipeline in subsequent activities.

    Please try and let us know if that helps.

    Thanks.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.