Skip to content

Inconsistent Text Escaping #470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lrobert opened this issue Jan 13, 2015 · 4 comments
Closed

Inconsistent Text Escaping #470

lrobert opened this issue Jan 13, 2015 · 4 comments

Comments

@lrobert
Copy link

lrobert commented Jan 13, 2015

I noticed after release 0.12.0 that my documents no longer open because there is inconsistent escaping. The erorr I get is the same as Issue #401. However I noticed that the ListItem element ListItem.php#L60 adds text this way:

$this->textObject = new Text(String::toUTF8($text), $fontStyle, $paragraphStyle);

whereas the text element doesn't escape anything. Shouldn't this be left up to the user to handle escaping in all cases?

@ghost
Copy link

ghost commented Jan 13, 2015

Yep, @lrobert, all escaping must be done outside of the library. One of the reasons is to avoid multiple escaping of the same text.

@ghost ghost closed this as completed Jan 13, 2015
@lrobert
Copy link
Author

lrobert commented Jan 13, 2015

I mixed up escaping and encoding. Currently the ListItem encodes UTF-8 but doing just addText() does not. I'm just trying to figure out if it's intended to be this way or if I should a submit a PR to clean it up

@ghost
Copy link

ghost commented Jan 13, 2015

Thanks, @lrobert. I can perform an investigation, but only at weekend. I will really appreciate any additional information upon the problem.

@ghost ghost reopened this Jan 13, 2015
@ghost ghost self-assigned this Jan 13, 2015
@ghost ghost added the Consulting Request label Jan 18, 2015
@ghost
Copy link

ghost commented Jan 18, 2015

Hi, @lrobert. I double-checked the changes, and it seems all is working as intended. Do you still have any questions or experience any issues up on this?

@ghost ghost closed this as completed Jan 24, 2015
@ghost ghost added the Status: Responded label Jan 24, 2015
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant