Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Do not serialize scalar values #129

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

Merged

Conversation

@richardhj
Copy link
Contributor

@richardhj richardhj commented Apr 9, 2023

I don't know why all properties are becoming json_encoded, but this resulted in properties having malicious characters (i.e., ") when using asText().

Example:

Before:

$page->getProperty('E-Mail-Adresse')->asText(); // "me@example.org"

After:

$page->getProperty('E-Mail-Adresse')->asText(); // me@example.org

Copy link

what-the-diff bot commented Apr 9, 2023

PR Summary

  • Improved asText() method handling
    Added a condition to better handle different content types, improving overall functionality.

@johguentner johguentner added the tests-required Tests for this PR are required label Apr 10, 2023
Copy link
Member

Thank you @richardhj for the PR!
Yeah, this is a valid point! When I wrote the ->asText() method, I wasn't sure what to do with certain properties. For scalar values, this definitely makes sense!

Could you please write tests for the implementation. Then we will merge this within 1.1.0.

@johguentner johguentner added this to the 🍵 v1.1.0 milestone Apr 10, 2023
@johguentner johguentner changed the base branch from dev to fix/as-text-for-scalar-values April 30, 2023 13:46
@johguentner johguentner merged commit 0c0233f into 5am-code:fix/as-text-for-scalar-values Apr 30, 2023
@johguentner johguentner removed the tests-required Tests for this PR are required label Jun 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

🍵 v1.1.0

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /