From 1330a1c4088c12ad6aca0be154f4fb1002118019 Mon Sep 17 00:00:00 2001 From: Roy Johnson Date: Tue, 7 Nov 2006 20:41:57 +0000 Subject: [PATCH] fix - post titles containing periods result in urls containing periods --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Post.pm | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 05b379fef..f8789ec84 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -35,6 +35,7 @@ - fix: Tasks now start at zero duration in the PM system - fix: RSS for collaboration systems now properly shows in the head rather than the body - fix: Gantt chart bars erroneously being shifted one day to the right + - fix: Post titles containing periods result in urls containing periods 7.1.4 - Template variables in the main Survey Template were out of date in the diff --git a/lib/WebGUI/Asset/Post.pm b/lib/WebGUI/Asset/Post.pm index 0bf20e057..38ef678c2 100644 --- a/lib/WebGUI/Asset/Post.pm +++ b/lib/WebGUI/Asset/Post.pm @@ -255,6 +255,26 @@ sub exportAssetData { #------------------------------------------------------------------- +=head2 fixUrl ( url ) + +Extends superclass method to remove periods from post urls + +=head3 url + +The url of the post + +=cut + +sub fixUrl { + my $self = shift; + my $url = shift; + $url =~ s/\./_/g; + + $self->SUPER::fixUrl($url); +} + +#------------------------------------------------------------------- + =head2 formatContent ( [ content, contentType ]) Formats post content for display.