Ticket #2381 (closed defect (bug): fixed)

Opened 6 years ago

Last modified 5 years ago

WP error converting URL for a domaini containing "1X"

Reported by: delluva Owned by: davidhouse
Priority: normal Milestone:
Component: General Version: 2.0
Severity: normal Keywords: 1x100.net, error converting url bg|reporter-feedback bg|has-patch bg|commmit
Cc:

Description

Hello,

we've been experiencing the following problem while using WP 2.0 (and 2.0.1) on one of our projects. The domain we're working on is "www.1x100.net". WP converts the domain name into "www.1×100.net", and, obviously, stops working (the theme is not loaded correctly).

We've fixed the error by simply commenting line 36 in file "wp-includes/functions-formatting.php":

$curl = preg_replace('/(\d+)x(\d+)/', "$1×$2", $curl);

Actually we do ignore if any other problems may occour by commenting this line of code. The problem appear to be present even if the "1x100" is the name of a folder in the complete URL. Hope that this helps you.

Thanks for your time and your wonderful product!

lorenzo dell'Uva

Attachments

x_multiplication_fix.diff Download (571 bytes) - added by markjaquith 6 years ago.
X multiplication fix
x_multiplication_fix.2.diff Download (599 bytes) - added by davidhouse 6 years ago.
2381.diff Download (594 bytes) - added by davidhouse 6 years ago.

Change History

  • Summary changed from WP error converting URL for a domaining containing "1X" to WP error converting URL for a domaini containing "1X"

I don't think we should be passing URLs through wp_texturise...

× is a multiplication sign in case anyone's interested.

  • Keywords bg|reporter-feedback added

Could you load wp-admin/options.php in your browser, find the option 'siteurl' and paste it here please? I'm wondering whether the value in the database is already incorrect or whether it's getting screwed up on the fly.

X multiplication fix

  • Keywords bg|has-patch added
  • Owner changed from anonymous to markjaquith
  • Status changed from new to assigned
  • Milestone changed from 2.0.1 to 2.1

This is the second time that that thing has caused problems. See #1890

The uploaded patch should fix it in the 'home' value. anything with "url" or "directory" was already excluded.

I'm actually of the opinion that this functionality should be banished, for all the trouble it has caused. If you're a math blogger, you'll likely know how to code a multiplication symbol.

Hello,

we've applied the fix but it doesn't work correctly. Still need to comment the line 36. By the way the site url is displayed correctly in the wp-admin/options.php even when the system gives the error.

You probably need siteurl as well. Try this second patch.

david, it is alread testing strstr($info, 'url'), so strstr($info, 'siteurl') is redundant (it'll always match 'url' first).

I still think this thing should be banished altogether.

You're not wrong. Strange your patch didn't work then...

delluva, could you tell us exactly what the error says? (Particularily the line number will be helpful)

Mark: I'm not sure we should give up on this quite yet. If we don't find the culprit here, removing one line from wp_texturise won't solve all the problems: it could screw up on some other regex, and we'll get further tickets in the future. Best to find where wp_texturise is being called and remove it.

  • Owner changed from markjaquith to davidhouse
  • Status changed from assigned to new
  • Severity changed from critical to normal

According to MattRead, "...the bloginfo filter passes all bloginfo calls through wptexturize".

I'll have a look at this tonight.

No idea why this took us so long to solve ;)

  • Keywords bg|commmit added
  • Owner changed from davidhouse to markjaquith
  • Status changed from new to assigned

1

  • Owner changed from markjaquith to davidhouse
  • Status changed from assigned to new

*steals bug back*

  • Status changed from new to assigned

This should work now.

/me kicks trac

  • Status changed from assigned to closed
  • Resolution set to fixed

(In [3681]) Don't texturize home. Props Mark Jaquith and David House. fixes #2381

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone changed from 2.1 to 2.0.3

Reopen for inclusion in 2.0.3.

  • Status changed from reopened to closed
  • Resolution set to fixed

(In [3746]) Don't texturize home. Props Mark Jaquith and David House. fixes #2381

  • Milestone 2.0.3 deleted

Milestone 2.0.3 deleted

Note: See TracTickets for help on using tickets.