create new tag
, view all tags

TypographyPluginDev Discussion: Page for developer collaboration, enhancement requests, patches and improved versions on TypographyPlugin contributed by the TWikiCommunity.
• Please let us know what you think of this extension.
• For support, check the existing questions, or ask a new support question in the Support web!
• Please report bugs below

Development discussion for TypographyPlugin

-- EricScouten - 07 Jan 2003

I was very interested in using this plugin, but found that the en-dash processing has the unfortunate side effect of turning HTML comments into non-comments. For example, the following text in a topic:

<!-- This is an HTML comment -->

is turned into this in the rendered page:

<! – This is an HTML comment – >

The expectation, of course, is that it would not be visible at all in the rendered text. This can be a particularly surprising when following the recommended method of hiding topic access control. It also messed up my form code in the page header (no Go box).

Taking a look at the code, it doesn't appear that it should be too difficult to detect the occurence of the en-dash shorthand within the context of an HTML comment (start or end) marker. On the other hand, I'm not familiar with the particular regexp syntax being used in that code. Anyone else want a crack at a fix?

-- DavidBright - 15 Apr 2003

Similarly it breaks JavaScript snippets by converting

<script language="JavaScript">
myfunc("Hello, World!")


<script language="JavaScript">
myfunc(&lquot;Hello, World!&rquot;)

Is there no generic way in the plugin code to check wether text should actually be presented or is code?

(The script is not embedded in a Wiki .txt file, but in a skin template, ie. templates/twiki.skin.tmpl.)

-- UffeFriisLichtenberg - 04 May 2003

What happens if you enclose the block in pre ? (this works for embedding stylesheets or javascript in regular twiki)

<script language="JavaScript">
myfunc("Hello, World!")

-- MattWilkie - 07 May 2003

A strange problem with this is that the transformation of -- into ndash occurs only under IE, not Mozilla, and > is transformed into gt. This means comments don't close & tags are invalid. Whole sections of pages (e.g. a forms area, the search field) can disappear & sundry other style problems. Sorry, discovered this back in August, but only just remembered to post it. We were using this plugin with Mozilla for several months with no problems, but picking up IE users has force us to drop it for now.

-- ChrisHogan - 25 Nov 2003

checked .zip into CVS

-- WillNorris - 19 Jul 2005

A TWiki:TWiki.SpecialCharacters link has been added to the Plugin topic. Please feel free to take that into the next Plugin release.

-- PeterThoeny - 22 Feb 2006

Edit | Attach | Watch | Print version | History: r9 < r8 < r7 < r6 < r5 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r9 - 2006-02-22 - PeterThoeny
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.