0

I have a variable which has this a javascript code value before saving.:

<script type='text/javascript' src='http://112.199.36.77:58181/javascripts/api/viz_v1.js'></script><div class='tableauPlaceholder' style='width: 1004px; height: 636px;'><object class='tableauViz' width='1004' height='636' style='display:none;'><param name='host_url' value='http%3A%2F%2F112.199.36.77%3A58181%2F' /> <param name='site_root' value='&#47;t&#47;BDES_Default' /><param name='name' value='MarketInformationSummary&#47;MarketInformationSummary' /><param name='tabs' value='no' /><param name='toolbar' value='yes' /></object></div>

But right before saving, joomla adds this " \' " character for every part of the value which becomes like this :

<script type=\'text/javascript\' src=\'http://112.199.36.77:58181/javascripts/api/viz_v1.js\'></script>
            <div class=\'tableauPlaceholder\' style=\'width: 100%; min-height: 450px;\'>
            <object class=\'tableauViz\' width=\'100%\' height=\'500px\' style=\'display:none;\'>
            <param name=\'host_url\' value=\'http%3A%2F%2F112.199.36.77%3A58181%2F\' />
            <param name=\'site_root\' value=\'/t/BDES_Default\' />
            <param name=\'name\' value=\'MarketInformationSummary&#47;MarketInformationSummary\' />
            <param name=\'tabs\' value=\'no\' />
            <param name=\'toolbar\' value=\'no\' />
            </object>
            </div>

for the end result, when the value is displayed in the page, it does not show the URL being displayed by the variable.

Why does this happen? why does joomla need to add \' in the string? is there a way to escape this value in order to save the variable as it is?

1

My honest mistake. I was executing the wrong task which calls the model function that adds \' in the variable's value.

  • 2
    Could you mark your own answer as accepted? Then it won't stay on unanswered list. – Rene Korss Aug 9 '15 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.