• Resolved bomdiabrasil

    (@bomdiabrasil)


    Hello AWP Classifieds Team,

    I found two small bugs and a translation issue in the email that is sent to the ad owner when an admin approves a listing. Both are in the template:

    frontend/templates/email-ad-enabled-user.tpl.php

    Environment: AWP Classifieds 4.4.7, WordPress (PHP 8.x), site language German (de_DE). Emails are sent as plain text.

    Bug 1 — " shown literally instead of real quotation marks

    The body line renders as:

    Your Ad "Testanzeige" was recently approved by

    Root cause (line 15): the string is wrapped in esc_html__(). Because the email is plain text, esc_html() converts the literal double quotes in the sentence into the HTML entity ", which is then shown verbatim in the plain-text mail. The same applies to esc_html( $listing_title ) and esc_html( $contact_name ) — any character that esc_html() encodes will appear as an HTML entity in the plain-text email.

    Suggested fix: do not run esc_html() on content that goes into a plain-text email (use the raw translated string / $listing_title directly, or decode entities). This affects all languages, not only German.

    Bug 2 — blog name and site URL run together (missing line break)

    The footer renders as:

    Dackel.dehttps://http://www.dackel.de

    Root cause (lines 21–23): the blog name is echoed in one <?php ... ?> block and the URL in the next. PHP strips the single newline immediately following ?>, so there is no line break between the two values.

    Suggested fix: emit an explicit newline, e.g. echo awpcp_get_blog_name() . "\n"; before echoing home_url().

    Minor note (localization): In the bundled languages/another-wordpress-classifieds-plugin-de_DE.po, the body string “Your Ad “%1$s” was recently approved by the admin…” has an empty msgstr, so it falls back to English even on German sites. (The greeting “Hello %s,” is translated.) Adding the German translation would complete the localization.

    Thanks for a great plugin!

    Best regards,
    Christian Ludger

Viewing 1 replies (of 1 total)
  • Plugin Support Garret L

    (@garret1996)

    Hi @bomdiabrasil

    Thank you for taking the time to report these issues and for providing such detailed analysis, reproduction information, and suggested fixes.

    I’ve shared your findings with our developer so we can review them and improve this area in a future update.

    We appreciate you helping us identify and document these issues.

    Thanks again!

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.