https://antibiotiqueaugmentin.com/surdosage-augmentin-bebe/
× This is the optional Forum header for the Suggestion Box.

Grid making a weird subsititution.

  • neo314
  • neo314's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 4 months ago #631

My client is pasting html code from a widget provided by another service into a text field which I am displaying with the grid component. Much of the HTML is deprecated but usable.

What is weird is that part of that code reads:

<td align="right" valign="top"><div style="color: #33322E;"><font size="4">$875/month</font></div></td>

With the value of the price number changing regularly. The Grid is displaying all of the information correctly except it is cutting out the $ and first 2 digits so the output reads:
<td align="right" valign="top"><div style="color: #33322E;"><font size="4">5/month</font></div></td>

Any idea what is causing this? I really need it fixed asap. If I insert a space after the $ it works fine, but the point is to not do that for my tech unsavy client who should be able to just paste the code given by the other service provider. This is really strange.

:S

Last edit: 14 years 4 months ago by neo314.

Please Log in or Create an account to join the conversation.

  • neo314
  • neo314's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 4 months ago #632

I tested this by adding $ to other parts of the same code snippet. The same thing happens for:

<td height="30" align="left" valign="top"><div style="color: #4B1F63;"><font size="5">$860 main st, somewhere, OR</font></div></td>

and
<td><div style="color: #33322E;">$503-304-9576</div></td>

It does not do this for a $ in front of letters, only digits. :(

Last edit: 14 years 4 months ago by neo314.

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #633

Hi,

if you insert in field(s) html tag(s), there is no html validation, that can check if the tag is ok. So this can result in data not beeing displayed correctly.

$ sign, this is php variable declaration.

You may try with escape caracter \$

$newline = "A newline is \n";
$return = "A carriage return is \r";
$tab = "A tab is \t";
$dollar = "A dollar sign is \$";
$doublequote = "A double-quote is \"";

Best regards,
Viljem

Please Log in or Create an account to join the conversation.

  • neo314
  • neo314's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 4 months ago #635

I appreciate what you are saying, but the program should handle the user input by escaping or encoding it before working with it and the $ does not require escaping to display.

I want to correct the problem rather than make the client adapt. Also, this still does not track as the source of the issue.

The HTML is displaying correctly. A dollar symbol does not get replaced and a dollar sign adjacent to letters does not get replaced, but a dollar sign adjacent to any digits replaces the dollar sign and two digits with nothing. I believe a dollar sign adjacent to a numeral is not a valid variable name, so it seems the problem is somewhere else.

Please Log in or Create an account to join the conversation.

  • neo314
  • neo314's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
14 years 4 months ago #655

Any reply? I don't see how your response could address the problem. I want to keep my client's need to edit the cut and paste code down and if there were no other alternative, then that would be that, but your response does not seem to be what is happening here, as I stated.

I don't mean to be abrupt. I just want to be sure the issue is not closed.

Please Log in or Create an account to join the conversation.

More
14 years 4 months ago #661

Hi,

the issue is not closed. We are still searching for the solution that would fit you best.

Can you use

&#36;
code for $ sign?

This is the case with html.

Best regards,
Viljem

Last edit: 14 years 4 months ago by user62.

Please Log in or Create an account to join the conversation.

Moderators: tomaz
Time to create page: 0.115 seconds

Contact Us

Contact us on Discord

Contact us on Facebook