Opened 11 years ago
Closed 11 years ago
#34619 closed defect (bug) (fixed)
Avoid using HTML tags in translation strings (wp-admin/includes/upgrade.php)
| Reported by: | ramiy | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.4 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: | Focuses: |
Description
Found a wrong use of str_replace() in translations strings. We should use sprintf() instead.
See the attached patch fixing this issue.
Attachments (3)
Change History (12)
#2
@
11 years ago
- Summary Use sprintf() instead of str_replace() in translations strings → Avoid using HTML tags in translation strings (wp-admin/includes/upgrade.php)
#4
follow-up:
↓ 5
@
11 years ago
The same string is also used in tags/4.3.1/src/wp-admin/includes/schema.php#L977.
It's a site option used for newly created sites in Multisite. We can't remove str_replace() here, it would still be needed for back-compat with the stored text.
#5
in reply to: ↑ 4
;
follow-ups:
↓ 6
↓ 8
@
11 years ago
Can we use sprintf() strings in both places?
#6
in reply to: ↑ 5
@
11 years ago
Replying to ramiy:
Can we use
sprintf()strings in both places?
Haven't tested yet, but I think it was done this way because network_home_url() or get_current_site() is not available yet when populate_network() run for the first time.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
The second patch better - this way we avoid using HTML tags in the translation strings.