Repository navigation
Fix: Show object names without HTML entities - #315
Merged
Merged
Conversation
Co-authored-by: Yakir Sitbon <KingYes@users.noreply.github.com>
Co-authored-by: Yakir Sitbon <KingYes@users.noreply.github.com>
Co-authored-by: Yakir Sitbon <KingYes@users.noreply.github.com>
This was referenced Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Object names in the activity log table, CSV export, and REST/Abilities output showed literal HTML entities (for example
&and’) instead of&and apostrophes.Why
Hooks stored
esc_html( get_the_title() ), so titles were saved HTML-encoded after WordPress typography/character conversion. The presenter appliedesc_html()again, and the React UI rendered the result as plain text.How
get_post_field( 'post_title', ... )when logging posts, attachments, and comment parent posts.object_namevalues inAAL_Log_Presenterfor table descriptions, export, and REST/Abilities JSON.Fixes #312. Supersedes #313 — thanks a lot @solracsf for reporting the issue and for the contribution! This PR fixes the root cause at write time and decodes existing rows in every output (table, export, REST).
✨ PR Description
1. Problem & Context
Object names were being stored in the database as HTML-encoded strings, leading to double-encoding or incorrect raw output in JSON/CSV exports. The goal is to store raw data and decode legacy entries during presentation.
2. What Changed (Where)
class-aal-log-presenter.phpplain_object_name()helper to decode HTML entities for all output formats.class-aal-hook-attachments.phpesc_html()withget_post_field()for raw title storage.class-aal-hook-comments.phpesc_html()withget_post_field()for raw title storage.class-aal-hook-posts.phpesc_html(get_the_title())withget_post_field()for raw storage.test-hook-posts.phptest-log-presenter-object-name.php3. How It Works
The storage layer now bypasses
esc_htmlto save raw strings. TheAAL_Log_Presenternow interceptsobject_nameviaplain_object_name(), usinghtml_entity_decodeto ensure both legacy encoded and new raw strings are normalized before being sent to the UI or export files.Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using.
💡 Tip: You can customize your AI Description using Guidelines Learn how