Bug 6341 - Abstract word count limits appear to be incorrect
Abstract word count limits appear to be incorrect
Status: RESOLVED FIXED
Product: OCS
Classification: Unclassified
Component: General
2.3.4
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-10 11:48 PST by James MacGregor
Modified: 2011-08-15 13:35 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Patch against OCS pre-2.3.4 (1.12 KB, patch)
2011-01-10 13:04 PST, Alec Smecher
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James MacGregor 2011-01-10 11:48:23 PST
Again, courtesy of http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=7003&p=27045#p27045. It appears that abstract word counts are not correctly calculated, although while Trudy appears to be seeing a situation where more words than the limit can be added, I'm seeing one where drastically fewer words than the limit can be added (eg. when word limit is set to 200, I can only add 100). I can troubleshoot this further, but it would be nice to know what "counts" as a word.
Comment 1 Alec Smecher 2011-01-10 13:04:27 PST
Created attachment 3411 [details]
Patch against OCS pre-2.3.4

The abstract word count didn't remove HTML tags before counting. The count will always be a little rough, since we're guessing the number of words in HTML content, but it should be closer than you report. Could you try the attached patch and see if it improves the situation?
Comment 2 James MacGregor 2011-08-15 13:20:44 PDT
(In reply to comment #1)
> Created attachment 3411 [details]
> Patch against OCS pre-2.3.4
> 
> The abstract word count didn't remove HTML tags before counting. The count will
> always be a little rough, since we're guessing the number of words in HTML
> content, but it should be closer than you report. Could you try the attached
> patch and see if it improves the situation?

Hi Alec -- that's much closer now, thanks!
Comment 3 Alec Smecher 2011-08-15 13:32:53 PDT
Thanks, James; committed against ocs-stable-2_3 and master.
Comment 4 Alec Smecher 2011-08-15 13:35:01 PDT
Fixed word count
https://github.com/pkp/ocs/commit/13beaa1d86e3a6066a8b656113ed6e465a3e28d0